in reply to Premature end of script error
The error means just what it says : that a variable you are using in an eq comparison has not been initialised, ie it is undefined. Have a look at perldiag for an explanation of this warning.
I am guessing that that variable is $action.
You could change your param sub to always return a defined value. For instance:
sub param { my $key = shift; my $value = ....code to get value...; return defined $value ? $value : ''; }
Update
As blazar pointed out below, param() is from CGI, so you could do the following:and replace all your call's to param() as follows:sub get_defined_param { my $value = param(@_); return defined $value ? $value : ''; }
my $title = get_defined_param('title'); my $request = get_defined_param('request'); my $orderlist = get_defined_param('orderlist'); my $remark = get_defined_param('remark'); my $host = get_defined_param('host'); my $date = get_defined_param('date'); my $action = get_defined_param('action'); my $gamefile = get_defined_param('gamefile'); my $gamename = get_defined_param('gamename'); my $gamedesc = get_defined_param('gamedesc'); my $counter = get_defined_param('counter');
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Premature end of script error
by blazar (Canon) on May 25, 2007 at 11:58 UTC | |
|