in reply to Array for system() call
When system() gets a scalar, it goes to the shell to execute the command. This means that you open a new shell instance (such a ksh), and run the program, including any redirection.
If system() gets an array, it instead does the fork() and then uses exec() to start the process. This by-passes the shell, so shell redirection does not work.
i had a memory leak once, and it ruined my favorite shirt.
If system() gets an array, it instead does the fork() and then uses exec() to start the process. This by-passes the shell, so shell redirection does not work.
i had a memory leak once, and it ruined my favorite shirt.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re (2): Array for system() call
by dmmiller2k (Chaplain) on Oct 23, 2001 at 22:09 UTC | |
by blakem (Monsignor) on Oct 23, 2001 at 22:45 UTC | |
by dmmiller2k (Chaplain) on Oct 23, 2001 at 23:46 UTC |
In Section
Seekers of Perl Wisdom