in reply to value accumulation

Sorry, I don't understand really what your input and desired output is. Thus I can't also not follow what your code wants to do. Can you give us an example of your input and a description what good numbers are.
However, of course, I can rewrite your code to shorten it and make it more Perlish :-) I assume, that the data comes from a file.
use Tie::CSV_File; tie my @array, "Tie::CSV_File", $filename, WHITESPACE_SEPARATED; for my $i (1 .. $#array) { push @good_nums, $array[$i-1]->[0] * $array[$i]->[1] * $array[$i-1]->[1] * $array[$i]->[0]; # Did you really want to compute 4x a multiplication ?! } print @good_nums;
Well, I still don't know what's going on :-(
If the data doesn't come from a file, you could also achieve quite the same, all you have to do is to nest the data:
@array = map {[split]} @array; # instead of the first two lines of my snippet

Greetings,
Janek