develooper Front page | perl.beginners | Postings from May 2007

Query an IP from file

Thread Next
From:
Jeff Pang
Date:
May 22, 2007 02:46
Subject:
Query an IP from file
Message ID:
4652BBC7.1020203@earthlink.net
Hello,

I have a text file which contains lots of IPs,like:

58.253.0.0/16;
58.254.0.0/16;
58.255.0.0/16;
60.0.0.0/16;
60.1.0.0/16;
60.10.0.0/16;
60.16.0.0/16;
60.17.0.0/16;
60.18.0.0/16;
60.19.0.0/16;
60.2.0.0/16;
60.20.0.0/16;
60.21.0.0/16;
60.22.0.0/16;
60.23.0.0/16;
60.3.0.0/16;

My question is,given an IP,ie 59.32.232.33,how can I know it exists in
this file or not?
Is there a module already?thanks.

-- 
http://home.arcor.de/jeffpang/


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About