in reply to hash problems

If I understand yout Problem right this might do:
my $ptr; for ( my $i = 0; $i < @numbers; $i++ ){ $ptr->{$i}->{ number } = $numbers[$i]; $ptr->{$i}->{ sign } = $signs[$i]; }
This is a reference for a hash. You can now get your values back as:
while (@new_numbers){ my $i = $_; if ( defined $ptr->{$i} ){ print $ptr->{$i}->{ sign }.$ptr->{$i}->{ number }."\t".$i; } }
This is not tested but should work. It uses references to a hash. Alternatively you might want to make $i part of the keys:
$hash{ $numbers[$i].":".$i } = $signs[$i];
But it would be much more complicated sorting the keys out. Hope this is what you wanted.