in reply to Finding specific keyword in Perl
#!/usr/bin/perl use warnings; use strict; my $static = 0; my @IPs; while (<DATA>) { push @IPs, $1 if /([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}) +/ and $static == 2; $static++ if /Static/; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Finding specific keyword in Perl
by zakishah (Novice) on Aug 21, 2012 at 14:55 UTC |