Beefy Boxes and Bandwidth Generously Provided by pair Networks DiBona
"be consistent"
 
PerlMonks  

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

by InfiniteSilence (Deacon)
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 drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2014-04-19 21:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (483 votes), past polls