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)/.