Yes, exactly. It is one of my pet peaves that q() makes \ special just for the sake of quoting a single character. In some ways I'd rather have ' be quoted by doubling it: 'This string isn''t ''valid'' in Perl'. But then things get really tricky if you try to extend that to deal with Perl's fancy delimiter schemes q(Too many ((s in string).
The only quoting in Perl that doesn't treat \ as special is "here docs":
my $string= <<"END";
Backslash (\) doesn't have to be doubled (\\) here.
END
That puts three backslashes into $string.
-
tye
(but my friends call me "Tye") |