誰能告訴我爲什麼firefox不打開與下面的Net :: HTTPServer線添加?
#!/usr/bin/perl
# v5.10.1/linux
use strict;
use warnings;
use Shell;
use Net::HTTPServer;
############ section ###############
my $server = new Net::HTTPServer(
port=>5000,
docroot=>"/home/frank/Perl/perl_info_pages",
log => "/home/frank/Perl/perl_info_pages/access.log",
chroot => 0, # - Run the server behind a virtual chroot().
# Since only root can actually call chroot,
# a URL munger is provided that will not
# allow URLs to go beyond the document root
# if this is specified.
# (Default: 1)/true ???
# allow only for localhost... and user ***
# super server daemon control of??
# cgi...
);
$server->Start();
$server->Process();
############# end of section ###################
# can anyone tell me why these lines work(to open up firefox) with the above section commented out, but do not work when they are uncommented??
my $linkurl = 'http://localhost:5000';
firefox ("$linkurl");
取而代之的是什麼?這是Perl腳本的最後一行嗎?你是否定義了一個'firefox'函數? –
是的最後一行是我的腳本的一部分。我認爲「使用殼牌;」是它工作所需要的(我沒有爲它定義的函數)。 – Carpenter