Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
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 imbibing at the Monastery: (3)
As of 2024-04-16 14:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found