use Net::Telnet; $telnet = new Net::Telnet ( Timeout=>10, Errmode=>'die',Input_Log=>'out.txt', Prompt=>'/[\$%#>]/');