Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^3: capture vars undef

by Chady (Priest)
on Jul 28, 2004 at 06:20 UTC ( [id://377937]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    # provided by the outermost if
    $1 = undef;
    ...
       $2 = 'bb';
       $3 = 'cc';
    }
    
  2. or download this
    $_ = "aabbccdd";
    if ( /^(\w\w)\w\w(\w\w)\w\w$/ ) {
    ...
        print "mid: $1 $2\n"; # the inner if's vars are still accessible h
    +ere
    }
    print "outer: $1 $2\n";
    
  3. or download this
    $_ = "aabbccdd";
    /^(\w\w)\w\w(\w\w)\w\w$/;
    ...
        print "mid: $1 $2\n";
    }
    print "outer: $1 $2\n";
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (5)
As of 2024-04-24 08:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found