in reply to net::telnet not behaving as expected

You should try
my $unamestring = $t->cmd("uname -a");
instead. The example in the Net::Telnet documentation uses a command (who) that returns several lines, that's why it's using an array. But you don't need to, because you're running a command that returns only one line.
By the way, would you have used "use strict" and "use warnings" ( as everybody should get used to ) you'd certainly receive an appropriate warning.

Replies are listed 'Best First'.
Re^2: net::telnet not behaving as expected
by tsk1979 (Scribe) on Mar 22, 2006 at 17:05 UTC
    I tried $unamestring also, it got the value 1. I think it took it in scalar context
      then try use Data::Dumper; print dumper \@unamestring and check what's happening.
        I got it fixed. Its working now. Cant figure out how it started working. Looks like some issue with prompt recognition. Was grepping for wrong string thanks for your help.