On Wed, Dec 10, 2003 at 05:05:26PM -0600, Dan Muey wrote:
> perl -e 'print "joe's mama";'
> Obvo=iously won't work
> perl -e 'print "joe\'s mama";'
> And any other versions of \\' all fail.

As you were told, this is a question of your shell. If you are
using a bourne shell (zsh, bash, ksh, etc...) try this:

  perl -e 'print "joe'\''s mama";'
          ^          ^ ^^        ^
          1          2 34        5

The trick is:
  1. start single quoted string
  2. end single quoted string
  3. escaped single quote
  4. start single quoted string
  5. end single quoted string

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to