Please help, i have problem with net:ssherl. Here is my code..

#!/usr/bin/perl -w


use strict;


use Net::SSH::Perl;


my $hostname = '10.5.104.5';
my $username = 'console';
my $password = 'console';
my $cmd = 'ls';
my $key = "/etc/ssh/ssh_host_rsa_key.pub";




print "\n";
print "hostname: $hostname\n";
print "username: $username\n";
print "password: $password\n";
print "cmd: $cmd\n";
print "\n";


if(! $ENV{HOME}) { $ENV{HOME}='c:\\' };


my $ssh = Net::SSH::Perl->new(
$hostname,
protocol => 2,
debug => 1,
interactive => 0,
identity_files => [$key]
);
$ssh->login($username, $password);
my ($stdout,$stderr, $exit) = $ssh->cmd('ls',"\n");
print $stdout;


**********************************************

When i run this perl script program hangs up, it logins into remote machine there is problem with cmd()... Output follows here...

hostname: 10.5.104.5
username: console
password: console
cmd: ls


BLR1-TEENA-D: Reading configuration data c:\/.ssh/config
BLR1-TEENA-D: Reading configuration data /etc/ssh_config
BLR1-TEENA-D: Connecting to 10.5.104.5, port 22.
BLR1-TEENA-D: Remote protocol version 2.0, remote software version OpenSSH_
BLR1-TEENA-D: Net::SSH::Perl Version 1.34, protocol version 2.0.
.LR1-TEENA-D: No compat match: OpenSSH_5.2
BLR1-TEENA-D: Connection established.
BLR1-TEENA-D: Sent key-exchange init (KEXINIT), wait response.
BLR1-TEENA-D: Algorithms, c->s: 3des-cbc hmac-sha1 none
BLR1-TEENA-D: Algorithms, s->c: 3des-cbc hmac-sha1 none
BLR1-TEENA-D: Entering Diffie-Hellman Group 1 key exchange.
BLR1-TEENA-D: Sent DH public key, waiting for reply.
BLR1-TEENA-D: Received host key, type 'ssh-dss'.
BLR1-TEENA-D: Host '10.5.104.5' is known and matches the host key.
BLR1-TEENA-D: Computing shared secret key.
BLR1-TEENA-D: Verifying server signature.
BLR1-TEENA-D: Waiting for NEWKEYS message.
BLR1-TEENA-D: Send NEWKEYS.
BLR1-TEENA-D: Enabling encryption/MAC/compression.
BLR1-TEENA-D: Sending request for user-authentication service.
BLR1-TEENA-D: Service accepted: ssh-userauth.
BLR1-TEENA-D: Trying empty user-authentication request.
BLR1-TEENA-D: Authentication methods that can continue: publickey,password,
ard-interactive.
BLR1-TEENA-D: Next method to try is publickey.
BLR1-TEENA-D: Next method to try is password.
BLR1-TEENA-D: Trying password authentication.
BLR1-TEENA-D: Login completed, opening dummy shell channel.
BLR1-TEENA-D: channel 0: new [client-session]
BLR1-TEENA-D: Requesting channel_open for channel 0.
BLR1-TEENA-D: channel 0: open confirm rwindow 0 rmax 32768
BLR1-TEENA-D: Got channel open confirmation, requesting shell.
BLR1-TEENA-D: Requesting service shell on channel 0.
BLR1-TEENA-D: channel 1: new [client-session]
BLR1-TEENA-D: Requesting channel_open for channel 1.
BLR1-TEENA-D: Entering interactive session.
BLR1-TEENA-D: Sending command: ls
BLR1-TEENA-D: Sending command: ls
BLR1-TEENA-D: Requesting service exec on channel 1.
BLR1-TEENA-D: channel 1: send eof
BLR1-TEENA-D: channel 1: open confirm rwindow 2097151 rmax 32768

// program hangs here.....