sub filter { my $str=shift; for ($str) { return '' unless $_; s/\s+$//; s/'/\\'/g; tr{<>;()\"\'?}{}d; s/