in reply to string escaping / de-escaping functions
There is also the quotemeta builtin function, which quotes any non-word character with a \. quotemeta will quote the space character but that doesn't seem to affect printing. An esoteric builtin I learned and only ever saw mentioned... here on perlmonks!
Example: perl -e "print quotemeta 'yo, what\'s a "henway"?'" Gives: yo\,\ what\'s\ a\ henway\?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: string escaping / de-escaping functions
by Anonymous Monk on Oct 25, 2008 at 06:35 UTC | |
by juster (Friar) on Oct 25, 2008 at 07:13 UTC |