net::ssh2 返回结果疑问

net::ssh2 返回结果疑问

1. 环境: perl 5.8.8   包: Net::SSH2

2.
use strict;
use Net::SSH2;

my $host = "";
my $user = "";
my $pass = "";
my $ssh2 = Net::SSH2->new();

$ssh2->connect($host) or die "Unable to $host\n";

if($ssh2->auth_keyboard($user,$pass)) {
    print "connect success!\n";
    my $chan = $ssh2->channel();
    $chan->exec("ls /tmp");
    print $_ while(<$chan>);
}
else {
    print "cann't connect\n";
}

$ssh2->disconnect();



3. 执行结果
   命令成功运行, 却得不到返回结果.

请教一下, 如果得到返回结果?  谢谢.
perldoc Net::SSH2