Sisyphus wrote:
> ----- Original Message ----- 
> From: "SelfSimilar" <[EMAIL PROTECTED]>
> .
> .
>   
>>    $chan->write("ls\n");
>>     
>
> If the "ls" command throws an error, you won't get to see what the error is. 
> (You'll simply get no output.) Better to write:
>
> $chan->write("ls 2>&1\n");
>
> That way, any error message will end up in the buffer, and you'll get to see 
> it.
> For the same reason, the same change should be made to the alternative code 
> that I provided earlier.
>
> Cheers,
> Rob
>
>
> _______________________________________________
> Perl-Win32-Users mailing list
> [email protected]
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
>   
I didn't even notice that you are using write and not exec.  Why not use 
exec and ext_data('merge') for one command runs ?  During my testing of 
write I found that a while loop isn't sufficient in the case of running 
any sort of command that takes a bit of time while producing its 
output.  Hence why he added the select call.  You also get os headers 
and other outputs which might not be ideal if you are parsing.  Anyway, 
Just curious.
_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to