Oh man I've gotten so used the the || setup I completely forgot about how it treats
the left side as scalar. Changed the script and it worked like a champ. This will
turn out to be a very useful script indeed. THANKS!
~Matt C.
--- Peter Scott <[EMAIL PROTECTED]> wrote:
> At 03:08 PM 5/11/01 -070
At 03:08 PM 5/11/01 -0700, Matt Cauthorn wrote:
> my @results=$s->cmd(String=>$string,Prompt=>'/root\@.*/') || warn
> $s->errmsg
>,"\n";
>
> print "@results\n";
> $s->close();
> }
>
>Here's the thing: the @results array only gives me the return value of the
>comma
Here's a snippet of code. It will be used to iterate through a cluster of machines
and bounce apache if needed. For now, a test command...
foreach my $server (@cluster) {
my $s=Net::Telnet->new(Host=>$server,Input_log=>'telnet.txt');
my $string='uname -n';
$s->login(Name