Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^2: String Match Use of $1 Uninitialized

by spickles (Scribe)
on Dec 16, 2009 at 19:58 UTC ( [id://813060]=note: print w/replies, xml ) Need Help??


in reply to Re: String Match Use of $1 Uninitialized
in thread String Match Use of $1 Uninitialized

Gentlemen:

Makes a lot of sense now. Thanks for that. The docs I was reading weren't from perlretut and didn't make the function of grouping apparent.

Regards,
Scott
  • Comment on Re^2: String Match Use of $1 Uninitialized

Replies are listed 'Best First'.
Re^3: String Match Use of $1 Uninitialized
by ikegami (Patriarch) on Dec 16, 2009 at 21:47 UTC

    Putting stuff in $1 is called capturing. While parens also do grouping, it's usually done using (?: ... ). For example, /abc(?:def|ghi)/.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (3)
As of 2025-06-22 08:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.