in reply to hash problems
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