Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Best Way to Map Data

by jwkrahn (Abbot)
on Jun 26, 2010 at 00:49 UTC ( [id://846626]=note: print w/replies, xml ) Need Help??


in reply to Best Way to Map Data

If you don't mind the extra step of removing the trailing comma then a hash should work:

my %hash; while ( <> ) { my ( $dept, $email ) = split /:/; $hash{ $dept } .= "$email,"; } s/,\z// for values %hash;

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2024-04-24 23:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found