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

Re: (ichi) Re x 4: Apocalypse 5 and regexes

by TheDamian (Vicar)
on Jun 08, 2002 at 23:10 UTC ( [id://172855]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
        $match = m/complex pattern/;   # match object in $match
        m/complex pattern>;            # match object in $0
    
  2. or download this
        print "$match[1] was val for $match[0]\n";
        
        my ($key,$val) = (0,1);
    
        print "$match[$val] was val for $match[$key]\n";
    
  3. or download this
        print "$match{val} was val for $match{key}\n";
    
        my ($key,$val) = ("key", "val");
    
        print "$match{$val} was val for $match{$key}\n";
    
  4. or download this
        print "$match<0> was val for $match<1>\n";          # array look-u
    +p
        print "$match<'val'> was val for $match<'key'>\n";  # hash look-up
        print "$match<$val> was val for $match<$key>\n";    # ???
    
  5. or download this
        print "$match<$val> was val for $match<$key>\n";    # ???
        print "$match<+$val> was val for $match<+$key>\n";  # array look-u
    +p
        print "$match<_$val> was val for $match<_$key>\n";  # hash look-up
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2024-04-16 19:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found