OR{ local $subRef = sub { $var = shift; print "hello monks --- [$var] \n"; }; &callFun(); } sub callFun { &$subRef(20); }
{ $subRef = sub { $var = shift; print "hello monks --- [$var] \n"; }; } &$subRef;
In reply to Re: calling from outside the closure a sub defined in a closure
by siva kumar
in thread calling from outside the closure a sub defined in a closure
by spx2
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |