in reply to Re^6: system and wildcard expansion?
in thread system and wildcard expansion?
My point was that they are both single scalars, sans meta-characters, but still get passed to the shell. Hence contradicting your quote from the docs.I think what the perldocs say is that bypassing the shell is an optimization. Being a language not bound to a particular operating system, I think it is not practical to document in advance how this will be handled in general. As in your case with a call invoking file association, it is very natural that system uses the shell.
Personally, I wish Perl would simply pass single scalars directly to the shell and let it work out what happens.You can always enforce it, by writing system('cmd /c Your Command Goes Here').
As is the standard Windows practice of looking in the current directory for executables before chasing the path.AFIK, this behaviour is kept even if the shell is not involved.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^8: system and wildcard expansion?
by BrowserUk (Patriarch) on Nov 12, 2010 at 11:54 UTC | |
by rovf (Priest) on Nov 12, 2010 at 12:08 UTC |