P.S.: In the future, please use <code>...</code>.while (defined(my $line = <FH>)) { if ($line =~ m/$pattern/) { printf "Port found: %d\n", (split $pattern, $line)[1]; } else { print "No Match\n"; } }
In reply to Re: Extract Port value from netstat file
by Anonymous Monk
in thread Extract Port value from netstat file
by saikat
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |