|laziness, impatience, and hubris|
Re: System() in list mode?by ikegami (Pope)
|on Oct 17, 2011 at 21:12 UTC||Need Help??|
First, it's not being called in list context. That means something else. I call this the multiple argument form.
When you use the single argument form, system expects a shell command and will launch a shell to execute the command*, so
is the same as
The shell expands $PATH, and in turn, does
which is quite different than your
You must either use the shell
or you must do what it would do
You should start by launching a shell, then!
Or not. This is something you can do yourself quite easily.
* — As an optimisation, Perl avoids launching a shell when it's obvious that the shell isn't needed.