in reply to RE: Re: Regex Help
in thread Regex Help

You have to escape the dollar sign to protect it from the shell.

It just occurred to me that this is a case where s/// and s///e do exactly the same thing.

        - tye (but my friends call me "Tye")

Replies are listed 'Best First'.
RE: RE: RE: Re: Regex Help
by dchetlin (Friar) on Sep 23, 2000 at 07:24 UTC
    In the original post, he didn't escape the `$' in the replacement at all. But the post I responded to did backwhack it, and that code was in a file, so there was no shell involved. Moreover, in the OP's second post, he backwhacked it 3 times, to get a backslash all the way through the shell into Perl, which would make the replacement not interpolate. There's a discrepancy between the original post and those two posts wrt what behavior is wanted.

    You're right that this is a case where the /e modifier doesn't matter.