in reply to Including File in array

Actually for fast lookup you would be better using a hash than an array. Something like this populates a hash from a file (substitute your file handle for DATA):

use warnings; use strict; my %banned; @banned{do {local $/; split ' ', <DATA>}} = (); 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

Prints:

casino poker phetnermine viagra p0rn porn online porn is on the banned list

DWIM is Perl's answer to Gödel