Perl CGI 更改未反映在浏览器中
我是 Perl 脚本新手,遇到了一些麻烦。我有一个 HTML 表单,它将一些数据传输到 CGI 脚本。然而,它似乎正在放弃最旧版本的 CGI 脚本而不是最新版本。是否可能是因为下面的 perl 脚本有错误?我尝试使用调试器,但我不知道如何使用它来执行我的脚本,更不用说从命令行传递我需要的参数了。 感谢您的帮助!
#!/usr/bin/perl
use CGI;
use CGI::Carp qw(fatalsToBrowser);
$q = new CGI;
print $q->header;
$q->start_html('Finger User');
$q->h1('Finger User');
print "<pre>";
$user = $q->param("user");
print `/usr/bin/finger/ -s $user~`;
print "</pre>";
print $q->end_html;
I am new to Perl Scripts and I am having a bit of trouble. I have an HTML Form that transmits some data to a CGI script. However, it seems to be going off the oldest version of the CGI script instead of the newest version. Is it possibly because there is an error in perl script, which is below? I tried to use the debugger but I could not figure out how to use it to execute my script let alone pass the argument I need to it from the command line.
Thanks for any help!
#!/usr/bin/perl
use CGI;
use CGI::Carp qw(fatalsToBrowser);
$q = new CGI;
print $q->header;
$q->start_html('Finger User');
$q->h1('Finger User');
print "<pre>";
$user = $q->param("user");
print `/usr/bin/finger/ -s $user~`;
print "</pre>";
print $q->end_html;
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
更改“;”在这些行中添加到 ',':
并在末尾丢失 '/'
Change the ';' in these lines to ',':
and lose the '/' at the end of