Thanks #roboticus for your quick answer.
#!/usr/bin/env perl
use Net::Telnet;
print "reporting end of web server log files:\n";
my($input_log, $output_log, $dump_log);
$input_log="./input_log.log";
$output_log="./output_log.log";
$dump_log="./dump_log.log";
$hostname = "127.0.0.1";
$telobj = new Net::Telnet (-host => $hostname
,-port => 23
,-dump_log => $dump_log
,-input_log => $input_log
,-output_log => $output_log
,-telnetmode => ''
,-prompt => '/^]/'
);
$rad = $telobj -> cmd ("get sn");
pop @rad;
chomp @rad;
print "\n";
$telobj -> close;
the command gives back a 6 digit string like 123456.
de content of the dump_log is
> 0x00000: 67 65 74 20 63 6f 6d 6d 73 0d 0a get comms..
< 0x00000: ff fd 03 ff fe 01 ff fb 01 ÿý.ÿþ.ÿû.
Any idea?