Looking at your code I would guess that getservbyport() is returning undef which means that $svcwatch will also be undefined. Try adding the following to be sure:
my $svcwatch = ( $name !~ /^#/ ) ? getservbyport ( $port, $proto ) : next; if (! defined $svcwatch) { warn("getservbyport return undef"); }
In reply to Re: Use of uninitialized value warning on print
by vek
in thread Use of uninitialized value warning on print
by tcf03
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |