Replace Non Printable Characters in PERL String
March 26th, 2009
#replace non printable characters in the description
my %good = map {$_=>1} (9,10,13,32..126);
$description =~ s/(.)/$good{ord($1)} ? $1 : ' '/eg;
#replace non printable characters in the description
my %good = map {$_=>1} (9,10,13,32..126);
$description =~ s/(.)/$good{ord($1)} ? $1 : ' '/eg;