sub testspam { my $comment = shift; chomp $comment; use Encode; $comment=Encode::decode( 'utf-8', $comment ); read_blacklist(); for my $black (@blacklist_entries) { if ( $comment =~ /\b\Q$black\E\b/i ) { return "badword_comment $black"; } } }