![]() |
|
P is for Practical | |
PerlMonks |
Re: hash problemsby perldeveloper (Scribe) |
on Jul 08, 2004 at 11:11 UTC ( #372747=note: print w/replies, xml ) | Need Help?? |
If the order matters, then you'll have to use arrays. Better assign two keys to your $hash, one for an array of numbers (say @{$hash->{numbers}}) and one for an array of signs (@{$hash->{signs}}). Then look within the numbers array (@{$hash->{numbers}}, find the corresponding $i (that is $hash->{numbers}->[$i]) and extract the two signs: $hash->{signs}->[$i] and $hash->{signs}->[$i + 1].
In Section
Seekers of Perl Wisdom
|
|