Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
local $a=5; &fun1(); sub func{ print $a; local $a=10; print $a; } print $a; output: 5 10 5 Excepted output: 5 10 10
Please how to get excepted output
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: how to acces local varialbe
by jethro (Monsignor) on Feb 09, 2011 at 13:46 UTC | |
|
Re: how to acces local varialbe
by Corion (Patriarch) on Feb 09, 2011 at 13:42 UTC | |
by Anonymous Monk on Feb 09, 2011 at 13:50 UTC | |
|
Re: how to acces local varialbe
by Anonymous Monk on Feb 09, 2011 at 13:42 UTC | |
|
Re: how to acces local varialbe
by renshui (Novice) on Feb 10, 2011 at 07:36 UTC |