in reply to Re^5: EXEC fails, sometimes
in thread EXEC fails, sometimes

Success! Fully qualifying the Perl directory fixed the problem. This worked OK:
exec 'c:\perl\bin\perl print_2.pl';
The path string is different, and in fact incorrect, on the machine where it fails. The real solution is to fix the path string so the code is not machine-dependent. Thanks!

Replies are listed 'Best First'.
Re^7: EXEC fails, sometimes
by ikegami (Patriarch) on Dec 16, 2005 at 16:27 UTC
    Again,
    exec 'c:\perl\bin\perl print_2.pl';
    is more security prone and slower than
    exec 'c:\perl\bin\perl', 'print_2.pl';
    since a shell is involved in the top snippet.

    Also, if you're going to put the whole path, you might as well add ".exe" to speed things up slightly.

      Again, thanks.