Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: why is $1 cleared at end of an inline sub?

by LanX (Saint)
on Sep 16, 2021 at 12:42 UTC ( [id://11136829]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
      DB<3> sub bla { "XXX"=~/(X*)/; print "inside $1" }
    
      DB<4> bla; print "outside $1"
    inside XXXoutside
      DB<5>
    
  2. or download this
      DB<5> "YYY"=~/(Y*)/; bla; print "old $1"
    inside XXXold YYY
      DB<6>
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (2)
As of 2024-04-26 00:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found