go ahead... be a heretic | |
PerlMonks |
local and global variable problemby madM (Beadle) |
on Apr 30, 2014 at 15:39 UTC ( [id://1084520]=perlquestion: print w/replies, xml ) | Need Help?? |
madM has asked for the wisdom of the Perl Monks concerning the following question:
Hi Monks! Im trying to make a calculation inside a loop and work with the results after the loop has ended. In this example im creating an array (@matrix_numbers) with all values of the hash of hashes( $matrix->{$key}->{$key2}). As it is a problem with global and local variables i dont think is important to describe whats inside those variables. When i try to print the array after the loop has ended im getting nothing.. the array is empty.. any ideas why is this happening and how can i avoid this? thank you all!
Back to
Seekers of Perl Wisdom
|
|