Jennifer Garner schreef: > I have a file which is so large,which looking as: > > 61.156.49.18:28360 > 222.187.124.4:21016 > and more than 45,000,000 lines. > > the part after ":" is no use for me, I only need the IP.
You could first convert the file to integers, so from 20 bytes per line down to 4 bytes per line. Or use 61.156.49 = 61*256+156*16+49 = 18161 *2 as a direct index into an array ((255*256+255*16+255+1)*2=139232). Are you trying to find crowded ranges from these numbers? Like 222.187.0.0/16 etc. -- Affijn, Ruud "Gewoon is een tijger." -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>