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

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

by jwkrahn (Monsignor)
on Sep 06, 2011 at 17:02 UTC ( #924432=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $header_row= 'one two three four five';
    ...
    ...
    {
       $name2Index{$col_head} = $col++;
    }
    
  2. or download this
    my @header_row = qw/ one two three four five /;
    ...
    ...
    ...
    @name2Index{ @header_row } = 0 .. $#header_row;