in reply to 'my' headache...why doesn't this work?
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: 'my' headache...why doesn't this work?
by tachyon (Chancellor) on Apr 05, 2002 at 10:20 UTC |