Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^2: making presence/absence table from a hash of arrays

by Anonymous Monk
on Sep 06, 2011 at 09:04 UTC ( #924335=note: print w/ replies, xml ) Need Help??


in reply to Re: making presence/absence table from a hash of arrays
in thread making presence/absence table from a hash of arrays

The grep can be simplified with a smart match:

for my $key (sort keys %hash) { say "$key = ", join ' ', map $_ ~~ $hash{$key} ? 1 : 0, @array; }


Comment on Re^2: making presence/absence table from a hash of arrays
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (13)
As of 2014-09-30 14:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (373 votes), past polls