Syntactic Confectionery Delight | |
PerlMonks |
Re^3: Calling subroutine with \& and passing variablesby LanX (Saint) |
on Oct 29, 2017 at 07:49 UTC ( [id://1202263]=note: print w/replies, xml ) | Need Help?? |
Just use $SomeVariable inside your subroutine. Because it's declared outside with my it becomes a "closure variable".
Cheers Rolf
In Section
Seekers of Perl Wisdom
|
|