Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: What this pattern matches

by ikegami (Patriarch)
on May 12, 2006 at 05:22 UTC ( [id://548909]=note: print w/replies, xml ) Need Help??


in reply to What this pattern matches

That code stores in $1 a copy of $b with everything after the last "_" removed, including the "_" itself.

There are exceptions.
$1 is left unchanged if $b contains no "_".
$1 is left unchanged if $b contains nothing before the last "_".
$1 is left unchanged if $b contains nothing after the last "_".

When executed in list context, it returns $1 on match or an empty list on failure to match.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2024-05-26 14:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found