in reply to Forcing Array Context
Hi
The value of a hash key can only be a reference to an array, not an array itself. So: instead of:
# not $hierarchy{$directory} = (); # but $hierarchy{$directory} = []; # later, not push($hierarchy{$directory}, $filename); # but push(@{ $hierarchy{$directory} }, $filename);
perldoc perlref is your friend
HTH
ViceRaid
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Forcing Array Context
by Anonymous Monk on Jun 25, 2003 at 09:46 UTC | |
by ViceRaid (Chaplain) on Jun 25, 2003 at 10:05 UTC | |
by Anonymous Monk on Jun 25, 2003 at 09:57 UTC | |
by ViceRaid (Chaplain) on Jun 25, 2003 at 11:16 UTC | |
by Anonymous Monk on Jun 25, 2003 at 15:32 UTC |