so the shell gets invoked. I'm worried about the case where the filename contains characters " \ $ and so forth. (i.e., ones that have special meaning for the shell even when in double-quotes) - how do I protect from that? Would$x = `foo \"$filename\" | bar | baz`;
be foolproof? Is there a better alternative to using backticks in this situation?$filename =~ s/(["\\\$])/\\$1/g
In reply to quoting for backticks by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |