用telnet连2000,prompt要如何设置??

用telnet连2000,prompt要如何设置??

连到2000的TELNET,但提示是timed-out waiting for command prompt at 666 line 8
连到2000的prompt的设置要如何?  用telnet登录2000后出现的提示符是c:\>

use Net::Telnet();
my $host="10.2.15.222";
my $usename="administrator";
my $passwd="gmdnb";

        $telnet=Net::Telnet->new(Timeout=>1,Prompt=>'/[\$%#>] $|[\$%#>]$/');
        $telnet->open($host);
        $telnet->login($usename,$passwd);
        my @out=$telnet->cmd("dir");
        print @out;


QUOTE:
Debugging

The typical usage bug causes a time-out error because you've made incorrect assumptions about what the remote side actually sends. The easiest way to reconcile what the remote side sends with your expectations is to use input_log() or dump_log().

dump_log() allows you to see the data being sent from the remote side before any translation is done, while input_log() shows you the results after translation. The translation includes converting end of line characters, removing and responding to TELNET protocol commands in the data stream.

叁考CPAN上的说明..使用dump_log()或 input_log()去debug....
c:\> 後面可能还有看不到的char....你可以用上面方法看看是不是有看不到的char出现...