vinoth.ree has asked for the wisdom of the Perl Monks concerning the following question:
while(my($key, $value) = each(%hash) ) { print "$key => $value\n"; }
my($key, $value); while(($key, $value) = each(%hash) ) { print "$key => $value\n"; }
What is the different between these two code in case of "my" usage ?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Different usage of "my"
by moritz (Cardinal) on Mar 25, 2009 at 14:35 UTC | |
|
Re: Different usage of "my"
by kennethk (Abbot) on Mar 25, 2009 at 14:37 UTC |