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

Re: Arrays & Hashes

by artist (Parson)
on Aug 18, 2005 at 19:33 UTC ( #484946=note: print w/replies, xml ) Need Help??


in reply to Arrays & Hashes

use Data::Dumper; while(<DATA>){ chomp; my ($email,$domain) = split /\t/; push @{$hash{$domain}},$email; } print join "\n", keys %hash,"\n"; print "Email:",$hash{'yahoo.com'}[0].'@yahoo.com'; __DATA__ ahlnpstx gmail.com dghjklorsvwy hotmail.com cdegijlmqrstvwxz yahoo.com abegijknostv yahoo.com abcefghjlqrtuyz hotmail.com acghiknoprux hotmail.com abceghlmrstwxy gmail.com cdehiklmnqtwxyz gmail.com bdjklmortvw hotmail.com bdegjkmrsuxz gmail.com
--Artist

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (6)
As of 2020-05-26 13:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If programming languages were movie genres, Perl would be:















    Results (150 votes). Check out past polls.

    Notices?