Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: ?: and saving backreferences

by ikegami (Patriarch)
on Dec 05, 2006 at 23:50 UTC ( [id://588004]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $re = $left ? qr/ab(..)ef/ : qr/gh(..)jk/;
    
    /$re/ or die("Bad data");
    print "Caught $1\n"
    
  2. or download this
    my $re;
    if    (...) { $re = qr/.../ }
    ...
    
    /$re/ or die("Bad data");
    print "Caught $1\n"
    
  3. or download this
    my %re_lookup = (
       ... => qr/.../,
    ...
    
    /$re_lookup{...}/ or die("Bad data");
    print "Caught $1\n"
    

Log In?
Username:
Password:

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

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

    No recent polls found