On Wed, 12 Jan 2005 17:27:46 -0700, Dan Fish <[EMAIL PROTECTED]> wrote:
> Are ALL pattern matching variables set back to undef once another m// or
> s/// expression is encountered, even if it contains no parenthized
> expressions?
>
> For example, I would have expected $1 &am
Dan Fish wrote:
Are ALL pattern matching variables set back to undef once another m// or
s/// expression is encountered, even if it contains no parenthized
expressions?
perldoc perlre
[snip]
The numbered match variables ($1, $2, $3, etc.) and the related
punctuation set
Are ALL pattern matching variables set back to undef once another m// or
s/// expression is encountered, even if it contains no parenthized
expressions?
For example, I would have expected $1 & $2 to be valid in BOTH print
statements below...
#!/usr/bin/perl -w
#
$string="ABC DEF GH