Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2016-12-11 13:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (169 votes). Check out past polls.