如何用 HTML 标签替换终端控制字符?
my ($black,$red,$green,$reset) = ('^[[30m','^[[38m','^[[92m','^[[0m');
my $LogString = $red.'red'.$reset;
printf ("%s\n",$LogString);
$LogString =~s/$red/<font color="red">/g;
$LogString =~s/$reset/<\/font>/g;
printf HTML ("%s\n",$LogString);