in reply to nested Subroutines and my var
This code prints 4.our $bar; sub foo { local $bar = 4; # different $bar zbr(); } sub zbr { print $bar; }
The correct way is to pass parameters to functions.
Alberto Simões
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: nested Subroutines and my var
by Roy Johnson (Monsignor) on Mar 28, 2005 at 20:05 UTC |