On Wed, Jul 12, 2000 at 11:32:21AM +1000, Scott Howard wrote:
> On Tue, Jul 11, 2000 at 11:34:59PM +0000, Herbert Xu wrote:
> > 
> > But in the scope of a regex, the first $ can not be interpreted as the prefix
> > of a variable.  The second may be but only if you use s///e.
> 
> Umm..  Perl disagrees with you :)
> 
> $aa="bb";
> while(<>) {
>       s/$aa/xx/g;
>       print;
> }

You're right.  Perl does interpret $aa as a variable if it's defined, yuck.
Just think of the contortion the parser goes through with things like $\ and
$), no don't :)
-- 
Debian GNU/Linux 2.1 is out! ( http://www.debian.org/ )
Email:  Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt


--
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://slug.org.au/lists/listinfo/slug

Reply via email to