in reply to Re: Re: Re: another 'array to hash' question
in thread another 'array to hash' question
They're functionally equivalent, I know... but it's just that since what you are doing is really a hash-slice, why not use hash-slice syntax?# instead of this my $c = 0; my @columns = split(/\t/,$_); push @a, { map { $header[$c++] => $_ } @columns }; # do this my %row; @row{@header} = split(/\t/,$_); push @a, \%row;
|
|---|