Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^2: question related to hash

by aanriot (Sexton)
on Jun 24, 2011 at 11:19 UTC ( [id://911233]=note: print w/replies, xml ) Need Help??


in reply to Re: question related to hash
in thread question related to hash

Hash keys have to be unique, but you can use something like this:
#!/usr/bin/perl use strict; use warnings; my %hash=( rat=> [ "acggghhh", "fhhfjfjj", "dggdgdgdg" ], mat=> [ "dhhdhdhdh" ] ); foreach my $key (keys %hash) { print $key, "=", @{ $hash{$key} }, "\n"; }

Log In?
Username:
Password:

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

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

    No recent polls found