Please note that the slave immediately exits after sending the "5", thus implicitly closing the pty slave. Maybe this is the reason why the "5" is lost. A "sleep(1)" should help here.
Regarding echoing: setting the slave to raw with "$slave->set_raw()" should turn off echoing. This could also help with the lost "5".
Hope this helps,
Roland
PS: yes, ptys are VERY much black magic... :-)
In reply to Re: [IO::Pty] How to read from and write to slave?
by rgiersig
in thread [IO::Pty] How to read from and write to slave?
by puravida
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |