why is the $output returned by NET::Telnet->cmd is empty [ ], dump_log is Ok
- From: meena_selvam@xxxxxxxxx (Meena Selvam)
- Date: Mon, 27 Jun 2005 21:54:26 -0700 (PDT)
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
.
- Follow-Ups:
- Re: my telnet cmd output problem solved
- From: Meena Selvam
- Re: my telnet cmd output problem solved
- References:
- Re: is this an array context or scalar context?, while using Net::Telnet
- From: Meena Selvam
- Re: is this an array context or scalar context?, while using Net::Telnet
- Prev by Date: perl message passing module
- Next by Date: Re: my telnet cmd output problem solved
- Previous by thread: Re: is this an array context or scalar context?, while using Net::Telnet
- Next by thread: Re: my telnet cmd output problem solved
- Index(es):
Relevant Pages
|
|