> Admittedly, I should have read your original post more closely.  The program 
> your calling with system fails, not the system call itself, so eval would not 
> catch this.  Have you considered using the backtick operator and inspect the 
> output for errors? This might not be feasible if the called program has a 
> large amount of output that might mimic what error text you're looking for.

>From perldoc -f system : (excerpt)

The return value is the exit status of the program as returned by the
"wait" call.  To get the actual exit value shift right by eight (see
below).  See also "exec".  This is not what you want to use to capture
the output from a command, for that youshould 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).

Also, look at : perldoc perlfaq8, starting with the question :
"Why canât I get the output of a command with system()?"

________________________________________________________________________

Clinton Gormley [EMAIL PROTECTED]

www.TravelJury.com - For travellers, By travellers



Reply via email to