On Mon, Sep 17, 2001 at 09:25:07AM +1000, Crossfire wrote:
> my @splitline = split /\s+/, $line;
> my @ipaddr = ();
> foreach $i (@splitline) {
> if ($i =~ m/^\d+\.\d+\.\d+\.\d+$/) {
> push @ipaddr, $i;
> }
> }
> if ($i =~ m/^(\d+)\.(\d+)\.(\d+)\.(\d+)$/) ...
Yuck :)
my @ips = grep { /^(\d{1,3}\.){3}\d{1,3}$/ } split /\s+/, $line;
m.
--
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug
- [SLUG] Perl IP's etc peterw
- Re: [SLUG] Perl IP's etc Scott Howard
- Re: [SLUG] Perl IP's etc Andre Pang
- Re: [SLUG] Perl IP's etc peterw
- Re: [SLUG] Perl IP's etc Crossfire
- Mikolaj J. Habryn
