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

Re: Mapping an array to a string

by bunch (Sexton)
on Jan 08, 2008 at 20:22 UTC ( [id://661166]=note: print w/replies, xml ) Need Help??


in reply to Mapping an array to a string

Do you want to use arrays as hash keys? Only strings can be hash keys in Perl, but you can get a stringified representation of an array using eg. Data::Dumper or YAML, so you should do something like this:
use Data::Dumper; $hash{Dumper(\@array)} = $value;

Log In?
Username:
Password:

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

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

    No recent polls found