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\?
In reply to Re: string escaping / de-escaping functions
by juster
in thread string escaping / de-escaping functions
by fearless_fool
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |