Hi yifangt,
This line may be the problem:
Quote:
Originally Posted by
yifangt
Hello,
8 my $filename = $q->param('/home/yifangt/hello.cgi');
param is used to capture the parameters passed to a cgi script. For example if your cgi script is called test.cgi,
and you ran this script on your web server as
test.cgi?test=1
then, this variable $q->param('test') would be 1.
Since you probably don't have a parameter named '/home/yifangt/hello.cgi', $filename is an uninitialized value, therefore line 9 is an error
Can't use an undefined value as a HASH reference at /usr/lib/cgi-bin/Listing4-2.cgi line 9.
Hope that helps,
Dave