Note that a shell could still get invoked if @_ == 1 and the first element contains shell metacharacters.
Good point. And rather unfortunate. Many commands accept '--' as an argument to signify the end of the command line switches. You could pass that if you're executing such a program.
backticks('ls foo'); # Run "ls" with argument "foo" backticks('ls foo', '--'); # Run "ls foo" with argument "--"
In reply to Re^2: Non-shell-invoking system/exec and qx//
by ikegami
in thread Non-shell-invoking system/exec and qx//
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |