which obviously has a lot of room for improvements. Is there a CPAN module for this kind of thing?sub is_text { my $c = shift; my $cl = length($c); return 0 if ($cl == 0); my $t = $c; $t =~ tr/a-zA-Z0-9//cs; return ($cl - length($t)) < 100; }
In reply to Distinguishing text from binary data by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |