Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^2: strange behavior of parenthesis

by broquaint (Abbot)
on Jul 11, 2005 at 11:12 UTC ( #473896=note: print w/ replies, xml ) Need Help??


in reply to Re: strange behavior of parenthesis
in thread strange behavior of parenthesis

Further to that, you can find this documented in perlop under the m/PATTERN/cgimosx subsection of the Regexp Quote-Like Operators section:

If the /g option is not used, perlop in a list context returns a list consisting of the subexpressions matched by the parentheses in the pattern, i.e., ($1, $2, $3...). (Note that here $1 etc. are also set, and that this differs from Perl 4's behavior.) When there are no parentheses in the pattern, the return value is the list (1) for success. With or without parentheses, an empty list is returned upon failure.
HTH

_________
broquaint


Comment on Re^2: strange behavior of parenthesis

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (13)
As of 2014-09-02 20:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (29 votes), past polls