Please, format your post question effectively
Even when that is done. There are other some other best practice I think you should still look into.
... while(<$fh>){ chomp; (my $ip = $_) =~ m/(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})/; print $ip,$/; } ...
... while (<$fh>) { chomp; my $ip=""; if (m/(?<matched_ip>(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}))/){ $ip = $+{matched_ip}; } print $ip,$/; } ...
In reply to Re: getting syntex error in pattern search
by 2teez
in thread getting syntex error in pattern search
by ulaksh
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |