in reply to Parsing Net::Telnet Console Ouput
use HTML::FromANSI qw|%Options ansi2html|; $t=new Net::Telnet(Binmode=>1,Timeout =>20, Prompt=>'/\?/'); $t->dump_log("telnet.log"); $t->open("host"); $t->login("user","pword"); ###fetch terminal output here...store in $output $t->close(); ###HTML::FromANSI portion $Options{fill_cols} = 1; #preserve spacing print "<HTML><HEAD><TITLE>Results</TITLE></HEAD><BODY>". ansi2html("$output"). "</BODY></HTML>";
|
|---|