Perl Monk, Perl Meditation | |
PerlMonks |
Re: Correct syntax to access an array slice within a hash within a hashby snowcrash (Friar) |
on May 07, 2002 at 23:42 UTC ( [id://164855]=note: print w/replies, xml ) | Need Help?? |
Hi!
Well, basically you want @{$table{$key}{coords}}[0,3] to get your slice. you version ($table{$key}{coors}[0,3]) just uses the list 0,3 in a scalar context (i.e. the last element) and so only fetches the value indexed by 3. a few other points: all in all i'd have done something like this:
snowcrash
In Section
Seekers of Perl Wisdom
|
|