Spawning via a shell is going to have an overhead, since it will actually invoke an instance of whatever shell is configured to execute the command. This is going to use memory, process space etc which is unnecessary - in the extreme this could tie up the machine if it is configured to have a limited number of processes available to users.
There can also be security issues if you try and pass arguments to anything spawned via a shell, esp if you let the users specify the arguments free text.
Also, it's going to be platform dependent - by using the appropriate modules,you should be able to move the code from *nix's to win32 to whatever fairly easily - this alone makes it worthwhile (imho).
In reply to Re: spawning shell commands vs using Perl modules
by sch
in thread spawning shell commands vs using Perl modules
by qadwjoh
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |