Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Parsing text file into a hash with multiple values per key

by Kenosis (Priest)
on Oct 03, 2012 at 22:41 UTC ( #997143=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
             VM : host42306
             VM : host42307
             VM : host42308
    
  2. or download this
    Key 'host42049' has 10 values.
    Key 'host42125' has 10 values.
    Key 'host42016' has 10 values.
    Key 'host42124' has 10 values.
    
  3. or download this
    use strict;
    use warnings;
    ...
    }
    
    print "Key '$_' has " . ( values %{ $hash{$_} } ) . " values.\n" for k
    +eys %hash;
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (12)
As of 2015-08-04 12:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The oldest computer book still on my shelves (or on my digital media) is ...













    Results (63 votes), past polls