in reply to net::Telnet to connect public ip

Looking at your code, you don't seem to be checking for errors anywhere. Are you sure you actually successfully connect to the server (perhaps firewall issues)? Maybe this will shed more light on your problem.

use Net::Telnet (); use strict; use warnings; my $t = new Net::Telnet (Timeout => 100, Prompt => '/[^ <-]\>/', Errmo +de => "return") ; $username = "administrator"; $passwd = ""; if (!$t->open("hostname")) { die "can't open: $!\n"; } if (!$t->login($username, $passwd)) { die "can't login: $!\n"; } @lines = $t->cmd("dir"); print @lines;