I do know some perl, and this is a project i've been working on for some time. The compiler and komodo tell me there is a error on line 140, namely "Useless use of private variable in void context at #PATH#/main.pl line 140." It is a sub, called only once. I am running it in -w mode.
# Called as: my @ch_refnums = &findTickers($file_cont, $anndate);
sub findTickers {
my ($file, $ann_date) = @_;
my $match;
my $max_month = 0;
my $max_year = 0;
@temp = split (/\//, $ann_date);
my $month = $temp[0];
my $day = $temp[1];
my $year = $temp[2];
if ($month => 10) {
$max_month = $month-9;
$max_year = $year+1;
}
elsif ($month < 10) {
$max_month = $month+3;
}
==> if ($max_year > 1900) { # Error occurrs here.
$match = "[$month-$max_month][\/][1-3]?[0-9][$year|$max_year]" ;
}
else {
$match = "[$month-$max_month][\/][1-3]?[0-9][$year]" ;
}
}
There is more to the sub and prog. However, I think it is somewhere here that the error is actually occurring.
This error does not appear to be fatal, but i would want to know why it occurs...
Thanks!
Jon