Re: my telnet cmd output problem solved



i had to give a second command quit to get the output
meena

--- MEENA SELVAM <meena_selvam@xxxxxxxxx> wrote:

>
> according to dump_log when remote cmd is executed,
> the remote side sends the output, but printing
> output
> shows only []. where can i suspect?
> meena
> --- MEENA SELVAM <meena_selvam@xxxxxxxxx> wrote:
>
> > hi,
> >
> > i am not getting the output of the remote command
> > execution, in the $output, though the dump_log
> shows
> > that cmd is executed successfully,
> >
> > the following code involves scalar context or
> array
> > context?
> >
> > my output ie temp array is printed as three
> > blanklines followed by []
> >
> > i want to know in this code, the @tmp really
> > contains
> > the output or 1 or the boolean status only. (in my
> > case it is about 30 lines)
> > , and i run single command(although multiple cmds
> > are
> > supported in the code)
> >
> > sub sfRemoteRun($$){
> >
> > my $telnet = shift;
> > $cmds = shift;
> >
> > my @results;
> > my @buf;
> >
> > print STDERR " -SFREMOTERUN $runtime\n" if
> > $DEBUG;
> > eval {
> > local $SIG{'ALRM'} = sub {die "runtimedout";};
> > alarm $runtime;
> >
> > foreach my $eachcmd (@{$cmds}){
> > my @tmp = $telnet->cmd("$eachcmd");
> > push @results, @tmp;
> > printf("temp array: \n");
> > foreach (@tmp) {
> > print "$_\n";
> > }
> >
> > }
> >
> > $telnet->close;
> > alarm 0;
> > };
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam? Yahoo! Mail has the best spam
> > protection around
> > http://mail.yahoo.com
> >
> > --
> > To unsubscribe, e-mail:
> > beginners-unsubscribe@xxxxxxxx
> > For additional commands, e-mail:
> > beginners-help@xxxxxxxx
> > <http://learn.perl.org/>
> > <http://learn.perl.org/first-response>
> >
> >
> >
>
>
>
>
> ____________________________________________________
>
> Yahoo! Sports
> Rekindle the Rivalries. Sign up for Fantasy Football
>
> http://football.fantasysports.yahoo.com
>
> --
> To unsubscribe, e-mail:
> beginners-unsubscribe@xxxxxxxx
> For additional commands, e-mail:
> beginners-help@xxxxxxxx
> <http://learn.perl.org/>
> <http://learn.perl.org/first-response>
>
>
>




__________________________________
Do you Yahoo!?
Read only the mail you want - Yahoo! Mail SpamGuard.
http://promotions.yahoo.com/new_mail
.



Relevant Pages