while (@new_numbers){ my $i = $_; if ( defined $ptr->{$i} ){ print $ptr->{$i}->{ sign }.$ptr->{$i}->{ number }."\t".$i; } }