Mazza, Glen R. wrote:
1.) (Major question) I was wondering if I could get rid of the foreach and instead use some construct like:If (/@goodlist/) {...}Meaning "if the current line has *any* of the words in the array..."
See `perldoc perlfaq6` and search for /How do I efficiently match many regular expressions at once\?/
2.) (Minor question) The current script has a bug, it will output the line twice if it contains both words. I was wondering if the foreach has some form of "continue" statement that stops the current iteration of foreach and go to the next one so the line does not output twice. I couldn't find anything in the docs for this, though.
See `perldoc -f last` -- Just my 0.00000002 million dollars worth, Shawn Programming is as much about organization and communication as it is about coding. I like Perl; it's the only language where you can bless your thingy. -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] http://learn.perl.org/
