[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] '' vs q()



At 04.05 1998.05.18, Xah Lee wrote:
>#!/usr/local/bin/perl -w
>use strict;
>
>my $text = << q{eeend};
>technique for verbertim
>quoting of texts that may
>contain all types of special
>characters such as ({[<"'\//\'">]})
>eeend
>
>print $text;

You don't need to do that.  <<'EOT' does not require anything to be escaped
that I know of.

#!/usr/local/bin/perl -w
use strict;

my $text = <<'EOT';
!@#$%^&*()-_=+/?\|{}][~
EOT
print $text;

This is not a perfect test case, but I don't think anything needs to be
escaped with single quotes.

But if you do feel q() should work, perlbug it (i.e., send mail to
perlbug@perl.com, preferably with the perlbug program that comes with Unix
versions of perl).

--
Chris Nandor          mailto:pudge@pobox.com         http://pudge.net/
MacPerl: Power and Ease (ISBN 1881957322), http://www.ptf.com/macperl/
%PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10  1FF77F13 8180B6B6'])



***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch