"200.147.172.135" inserts another newline '\n' character at the end. You can do '200.147.172.135'
And yes, i think an array like @ignoreIPs can contain regex as an item.. And... If someone could help with the range of IPs... maybe use the double dot operator(..) somehow. On 5/1/12, Steven Buehler <st...@ibushost.com> wrote: > Hopefully I have the correct mailing list for this question. > > > > I have a script that works and looks as follows: > > ------- > > #$hash{SRC} is filled in by a database call. > > #These IP's are not the IP's in the real script. > > my @ignoreIPs = ("19.147.172.133", > > "19.147.172.135", > > "19.147.172.136"); > > > > my %ignoreIPs = map { $_ => 1 } @ignoreIPs; > > > > if(!exists $ignoreIPs{$hash{SRC}}){ > > print "$hash{SRC}\n"; > > } > > ------- > > > > This checks to see if one of the IP's in the @ignoreIPs equals the IP in > $hash{SRC}. I would like to do this so that I can also put in a range of > IP's OR individual IP's so that my @ignoreIPs would look something like > this: > > my @ignoreIPs = ("19.147.172.133-136", > > "200.147.172.135", > > "75.147.172.2[123].$"); #a regular expression > > > > I understand it might not look like the example @ignoreIPs, but being able > to do a range of IP's AND/OR an individual IP would be great so that I > don't > have to put in each individual IP. > > > > Any help would be greatly appreciated. > > > > Thanks > > Steve > > > > -- Somu. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/