I am having a last link problem and cannot figure out what might be the problem. Below is the code I am using
my $LASTX = 5;
open (DB, "<$db_file_name") or &cgierr("unable to open database:$db_file_name.\nReason: $!");
my @lines = <DB>;
close DB;
for ($i=$#lines; $i>=$#lines - $LASTX; $i--) {
chomp $lines[$i];
@tmp = &split_decode ($lines[$i]);
%tmp = &array_to_hash (0, @tmp);
$lastlink .= &site_html_link (%tmp);
}
And the result:
Message : fatal error: Modification of non-creatable array value attempted, subscript -2 at nph-build.cgi line 963.
Any help very much appreciated,
Thank you,
Lpluby
my $LASTX = 5;
open (DB, "<$db_file_name") or &cgierr("unable to open database:$db_file_name.\nReason: $!");
my @lines = <DB>;
close DB;
for ($i=$#lines; $i>=$#lines - $LASTX; $i--) {
chomp $lines[$i];
@tmp = &split_decode ($lines[$i]);
%tmp = &array_to_hash (0, @tmp);
$lastlink .= &site_html_link (%tmp);
}
And the result:
Message : fatal error: Modification of non-creatable array value attempted, subscript -2 at nph-build.cgi line 963.
Any help very much appreciated,
Thank you,
Lpluby