On Tue, Aug 13, 2002 at 03:41:17PM -0700, Ahmed Moustafa wrote:
> I call external programs with system(). It used to return the correct
> value i.e. zero if there is no error and a non-zero value otherwise.
> Recently, it always returns -1 even if the external programs work fine.
> What could be the reason?


>From perldoc -f system:
               
    The return value is the exit status of the program
    as returned by the "wait" call.  To get the actual
    exit value divide by 256.  See also "exec".  This
    is not what you want to use to capture the output
    from a command, for that you should use merely
    backticks or "qx//", as described in "`STRING`" in
    perlop.  Return value of -1 indicates a failure to
    start the program (inspect $! for the reason).


So apparently the call to the external program is not working fine.  Surely
you don't think perl is incorrect.


Michael  
--
Administrator                      www.shoebox.net
Programmer, System Administrator   www.gallanttech.com
--

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to