Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: 'Dynamic scoping' of capture variables ($1, $2, etc.)

by moritz (Cardinal)
on Dec 16, 2012 at 20:42 UTC ( #1009092=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use 5.010;
    use strict;
    ...
    __END__
    42
    undef
    
  2. or download this
    sub R {
       printf qq{before: \$_ is '$_'};
    ...
    after: $_ is 'xxxxx' $1 is '1' 
    after: $_ is 'xxxxx' $1 is '1' 
    after: $_ is 'xxxxx' $1 is '1' 
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (6)
As of 2014-10-01 22:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    What is your favourite meta-syntactic variable name?














    Results (40 votes), past polls