Also $1 is not initialised on the LHS of the regex whereas \1 is...
use warnings; $_ = 'oooooo'; s/(o)$1/foo/; s/(o)\1/foo/; s/(o)/\1/; s/(o)/$1/; __END__ Use of uninitialized value in concatenation (.) at script line 3. \1 better written as $1 at script line 5.
cheers
tachyon
s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print
In reply to Re: regex question: $1 vs. \1
by tachyon
in thread regex question: $1 vs. \1
by kiat
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |