in reply to Re^4: Stupid question about strings...
in thread Stupid question about strings...
Thank you both, AnomalousMonk and Laurent_R.
You've made clear something that previous (careless?) readings of the docs left me in a blindspot in which I conflated 'quotemeta' (as a generic descriptor) with q, qq, qr.... instead of understanding that quotemeta() IS an operator in its own right.
So, FTR, both versions of this code produce identical output:
C:\> perl -E "my $str = qq(|g|h|i); my $strQ = qq(\Q|g|h|i\E); say quo +temeta($str); say $strQ;" \|g\|h\|i \|g\|h\|i
P.S. Technically, this reply is directed to /me, but is done deliberately to acknowledge both previous replies and their authors.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Stupid question about strings...
by Laurent_R (Canon) on Jul 15, 2014 at 17:42 UTC |