For those wondering if I am losing the variable outside its 'my' scope: I am printing the result immediately after the calculations, like:
my $columnsum += $_->[$colnum] for @data; print "Total value = $columnsum";
...and...
$columnsum = 0; $columnsum += $_->[$colnum] for @data; print "Total value = $columnsum";
======================
Sean Shrum
http://www.shrum.net
In reply to Re: 'my' headache...why doesn't this work?
by S_Shrum
in thread 'my' headache...why doesn't this work?
by S_Shrum
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |