Re: I need to strip words from a varible.In reply to
I think this code will help you:
Code:
open (badwords, "badwords.txt") @badwords=<badwords>; close (badwords); foreach $words (@badwords) { if ($val =~ "$words") { print "Bad word was found!"; } else { print "No bad words found!"; } }