good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
note that backticks will have to wait for the program to finish and all buffers to be flushed before giving the output, while exec() will just switch to the new program and should be inherently faster than backticks; backticks uses pipes / fork / exec (oh yes, and the shell, as jwkrahn said) to accomplish its magic.
Also note that the two programs aren't at all equivalent, since a successful call to exec() never returns. (You probably know that, but still).
In reply to Re: exec vs. backtick-and-assign performance
by Joost
|
|