William Martin wrote:
>>> maybe you could capture the output with backticks instead
>>
>> of system():
>>
>>> $retcode = `$command`;
>>>
>>> and parse $retcode for different responses, so your script
>>
>> can then behave
>>
>>> accordingly. of course, you would need to know what the
>>
>> responses are ahead
>>
>>> of time.
>>>
>>
>> Even that wouldn't work because the warning messages are sent
>> to standard
>> error not standard output.
>
>
>
> yes, I wondered about that. but there's probably a way to redirect and
> capture STDERR. I forget what the code is, though.
$retcode = `$command 2>&1`
or perhaps better,
eval "$command 2>&1";
if( $@ ) {
...
}
--
Jeremy Wadsack
Wadsack-Allen Digital Group
------------------------------------------------------------------------
This is the analog-help mailing list. To unsubscribe from this
mailing list, send mail to [EMAIL PROTECTED]
with "unsubscribe" in the main BODY OF THE MESSAGE.
List archived at http://www.mail-archive.com/[email protected]/
------------------------------------------------------------------------