in reply to Re: Easy one for my fellow Monks
in thread Easy one for my fellow Monks

Q: Why wouldn't it be s/\(/,\(/; ? Don't you have to escape the second open paren as well?

If things get any worse, I'll have to ask you to stop helping me.

  • Comment on (shockme) Re: Re: Easy one for my fellow Monks

Replies are listed 'Best First'.
(tye)Re: Easy one for my fellow Monks
by tye (Sage) on Dec 20, 2001 at 03:22 UTC

    Parens are special characters to regular expressions. Only the first part of s/// is a regular expression. The replacement part is a string. Parens aren't special in strings (though $ and @ are, for example, so you'd have to escape those if you wanted a literal $ or @).

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