Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
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

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 chilling in the Monastery: (8)
As of 2016-08-30 09:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The best thing I ever won in a lottery was:















    Results (414 votes). Check out past polls.