in reply to Best approach to creating a regex from a filehandle
If all you are checking for is absence of a word in a black list, i'd suggest putting the black-listed words into a hash, and simply checking :
You could upper/lower case the candidate word to maintain canonality.if ( exists $Black_List{$candidate_word} ){ # complain, bail, or whatever ... }
What is the sound of Perl? Is it not the sound of a wall that people have stopped banging their heads against?
-Larry Wall, 1992
|
|---|