in reply to hash problems
? You would want to modify your for loop range (as you should, anyway) so that $i+1 doesn't go beyond the actual array. Instead of $new_numbers[$i+1], you might want $hash{$key+1}. It's hard to tell what you expect your code to do. What is @new_numbers?print "$value \t $new_numbers[$i] $new_numbers[$i+1]\n";
|
|---|