#!C:/Perl/bin/perl.exe
use Net::Telnet;
$telnet = new Net::Telnet ( Host=> '172.18.148.67',input_log => "input
+_log",dump_log => "dump_log",Timeout=>40,Prompt=>'/TL1</',Port => 327
+70) or die ("Cannot connect");
$telnet->open('172.18.148.67');#open telnet session
$telnet->print('ACT-USER::PROVIS1:::FKVKC8#J;');#Enter user activation
+ command
$telnet -> input_log("x:/log.txt");
$telnet -> dump_log("x:/log.txt");
$telnet->errmode(sub {die @_ unless $_[0] =~ /eof/});
@output = $telnet->print('RTRV-CRS-T1::SH2-10-1-42-21;'); #Execute a t
+est command
print @output; #Print the output
$telnet -> close;
RESULT OF DUMP_LOG:
> 0x00000: 52 54 52 56 2d 43 52 53 2d 54 31 3a 3a 53 48 32 RTRV-CR
+S-T1::SH2
> 0x00010: 2d 31 30 2d 31 2d 34 32 2d 32 31 3b 0d 0a -10-1-4
+2-21;..