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