I am new to perl and am having issues with this script i am using for a syslog server. I am not getting any responses from the original developer and as such bringin my issue to the perl gods for help.
I receive the following error when my program runs:
Use of uninitialized value in numeric gt (>) at....at line 537.the line in question is:
return ($total) if ($total > $max_nb)the function this belongs to is:
sub Unknown_Number { my $device = shift; my $max_nb = Octopussy::Parameter('wizard_max_msgs'); my ($total, $nb) = (0, 0); my $dir = Octopussy::Storage::Directory_Unknown($device); Octopussy::FS::Create_Directory("$dir/$device/Unknown/"); foreach my $fy (glob "$dir/$device/Unknown/*") { foreach my $fm (glob "$fy/*") { foreach my $fd (glob "$fm/*") { foreach my $f (glob "$fd/*") { chomp $f; $nb = `zcat "$f" | wc -l`; chomp $nb; $total += $nb if ($nb >= 0); return ($total) if ($total > $max_nb); } } } } return ($total); }
sorry this may seem long. Any help on this would be greatly appreciated.
In reply to uninitialized value in numeric gt (>) in perl by murphybr
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |