use warnings; use strict; my %banned; @banned{do {local $/; split ' ', }} = (); print join "\n", keys %banned; my $word = 'porn'; print "\n\n$word is on the banned list\n" if exists $banned{$word}; __DATA__ p0rn viagra phetnermine online poker casino porn