in reply to Hash newbie
Exactly. Your snippet is equivalent to:
my %h = (); foreach (0..$#FIELDS) { $h{$FIELDS[$_]} = $row[$_] } $result = \%h;
It's called a hash slice, and it should be documented in perldata.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Hash newbie
by christiffer (Initiate) on Jan 28, 2005 at 15:52 UTC | |
by revdiablo (Prior) on Jan 28, 2005 at 18:28 UTC |