use Socket qw(inet_aton); my $lower = inet_aton("192.168.1.0"); my $upper = inet_aton("192.168.99.255"); while (<DATA>) { chomp; my $ip = inet_aton($_); print "$_\n" if $lower le $ip and $ip le $upper; }
In reply to Re: Match a Range of IP's
by runrig
in thread Match a Range of IP's
by Dru
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |