perlseeker19 has asked for the wisdom of the Perl Monks concerning the following question:
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);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: using IPC::Run
by jethro (Monsignor) on Jul 29, 2008 at 12:56 UTC | |
by Anonymous Monk on Jul 29, 2008 at 14:18 UTC | |
by perlseeker19 (Novice) on Jul 30, 2008 at 06:39 UTC | |
|
Re: using IPC::Run
by Anonymous Monk on Jul 29, 2008 at 12:00 UTC | |
by perlseeker19 (Novice) on Jul 29, 2008 at 12:18 UTC | |
by Corion (Patriarch) on Jul 29, 2008 at 12:23 UTC | |
by perlseeker19 (Novice) on Jul 29, 2008 at 12:30 UTC | |
|
Re: using IPC::Run
by FunkyMonk (Bishop) on Jul 29, 2008 at 22:22 UTC |