Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Hash value printing... WITH ARRAYS *dun dun dun*

by InfiniteSilence (Curate)
on Feb 07, 2012 at 00:34 UTC ( #952189=note: print w/ replies, xml ) Need Help??


in reply to Hash value printing... WITH ARRAYS *dun dun dun*

Another way entirely:

~linux> perl -MMath::Cartesian::Product -e 'my %hash = (q|foo|=>[qw|fo +ol food foot|],q|bar|=>[qw|barricade|]); for (keys %hash) {cartesian +{print qq|@_\n|} [$_],$hash{$_}};'
Produces
bar barricade foo fool foo food foo foot
TIMTOWTDI

Celebrate Intellectual Diversity


Comment on Re: Hash value printing... WITH ARRAYS *dun dun dun*
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (8)
As of 2015-07-07 13:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (88 votes), past polls