简体   繁体   中英

Perl CGI Changes Not Being Reflected in Browser

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;

Change the ';' in these lines to ',':

print $q->header,
    $q->start_html('Finger User'),
    $q->h1('Finger User');

and lose the '/' at the end of

/usr/bin/finger

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM