Then you use:system will always try to execute /bin/foo with argument bar. But what if my executable is /bin/foo bar?my $binary = "/bin/foo bar"; system($binary);
That forces "list" interpretation rather than single-element list, and all is good.system { $binary } $binary, @other_args_if_any;
In reply to Re: Use of system() considered harmful
by merlyn
in thread Use of system() considered harmful
by pc88mxer
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |