Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Summarizing an array of IP's

by thelenm (Vicar)
on Jan 06, 2004 at 21:49 UTC ( #319257=note: print w/ replies, xml ) Need Help??


in reply to Summarizing an array of IP's

my %h; /^(\d+\.\d+\.\d+)/ and ++$h{$1} for <DATA>; print "$_: $h{$_} nodes\n" for sort keys %h; __DATA__ 10.0.0.1 10.0.0.2 10.0.0.3 192.168.1.5 192.168.1.6 192.168.10.3 192.168.10.4 192.168.10.5

-- Mike

--
XML::Simpler does not require XML::Parser or a SAX parser. It does require File::Slurp.
-- grantm, perldoc XML::Simpler


Comment on Re: Summarizing an array of IP's
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://319257]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (8)
As of 2014-09-22 06:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (182 votes), past polls