in reply to Match a Range of IP's

If I understand correctly, you just want:
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; }