Why do you use local when you don't want the effect of local?
local $a=5; &func(); sub func{ print $a; $a=10; print $a; } print $a; Output: 5 10 10
Also you have a typo with "func" or "fun1", and the output would really be on one line because "\n" is missing from the prints
In reply to Re: how to acces local varialbe
by jethro
in thread how to acces local varialbe
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |