When you use the double quotes: $arg looks like foo (bar) But when you use single quotes, there is no expansion just what you enter is what you get, so the $arg looks like foo \(bar\)
Obviously the second is not what you want. SO using single quotes, you set $arg like 'foo (bar)' Wags ;) -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, December 16, 2002 11:33 To: [EMAIL PROTECTED] Subject: regex What is the difference between: $arg = "foo \(bar\)"; and $arg = 'foo \(bar\)'; when using like: s/$arg/bleah/; One works, one doesn't. Why? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ********************************************************** This message contains information that is confidential and proprietary to FedEx Freight or its affiliates. It is intended only for the recipient named and for the express purpose(s) described therein. Any other use is prohibited. **************************************************************** -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]