$port = new Net::Telnet(Timeout => 1000, Port => 22); $port->open(FILE, "192.168.1.199"); $mw->fileevent(\*FILE, 'readable' , \&readdata);