in reply to Re: efficient function
in thread efficient function

Just wanted to add that system is basically fork + exec (in child) + waitpid (in parent) in unix systems.

In Windows, system corresponds to CreateProcess + a wait function (such as WaitForSingleObject), while exec and fork are emulated by Perl since they're not supported by the OS.

Update: Fixed error in Windows side.

Replies are listed 'Best First'.
Re^3: efficient function
by Marshall (Canon) on Aug 24, 2009 at 08:09 UTC
    Ikegami, a most excellent post!

    However, I suspect that OP doesn't need either exec() or fork(), but of course we can't know that without further clarification.

    For the OP, there is no need for these in a normal single Perl program as there are modules and functions that can usually do what you need, and much more efficiently.