Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^3: Calling subroutine with \& and passing variables

by LanX (Saint)
on Oct 29, 2017 at 07:49 UTC ( [id://1202263]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Calling subrutine with \& and passing variables
in thread Calling subrutine with \& and passing variables

Just use $SomeVariable inside your subroutine.

Because it's declared outside with my it becomes a "closure variable".

Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1202263]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (6)
As of 2024-04-23 18:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found