# If not white space character AND not non printable character remove +element
That's probably because there are too many negations. If you have an if with else , using negation in the condition makes it really hard to understand. So, instead of
if ($$hoh_ref{$key}{$value} !~ /[^[:print:]]/g && $$hoh_ref{$key}{$value} !~ /\s/) { delete $$hoh_ref{$key}{$value}; } elsif ($$hoh_ref{$key}{$value} =~ /[^[:print:]]/g) { while ($$hoh_ref{$key}{$value} =~ /[^[:print:]]/g) { print "Non Printable Characater:\t$&\n"; } }
you can use a bit simpler
if ($$hoh_ref{$key}{$value} =~ /[^[:print:]]/) { # no /g neede +d while ($$hoh_ref{$key}{$value} =~ /[^[:print:]]/g) { print "Non Printable Characater:\t$&\n"; } } elsif ($$hoh_ref{$key}{$value} !~ /\s/) { delete $$hoh_ref{$key}{$value}; }
($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,
In reply to Re: How to detect non printable characters and non white space characters?
by choroba
in thread How to detect non printable characters and non white space characters? [RESOLVED]
by thanos1983
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |