thank you one and all for your timely guidance
i have given @cat=qw(cmd),gave a set of commands and now able to achieve what that had been done using expect.pm"
i now would require ur suggestions and guidance on playing around with timers
there are two questions here1.i have to jus throw an exception when the timeout occurs
2.when i pump for eg...
$h = start /@cmd, /$in ,/$out; $in .= "some command"; pump $h until $out=~/some desired string/i;
i need to restart or atleast display an error message when the desired string is not got.
i have also seen an implementation $t = timeout(10); $h=start /@cmd, /$in ,/$out; this is to give 10 seconds of time for @cat to start,
this seems to be the response time,but gives an error cannot access object time through IPC::Run::Timer, help me in this regard thanks$in.="some command"; $t->time(5);
In reply to using IPC::Run by perlseeker19
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |