in reply to searching for multiple strings in a line

My first question is "Why are you doing this?"

My first suggestion is to read The Perl Regular Expression Tutorial. Obviously, you would do this with a regexp, possibly something like*:

@cmd = ($statement =~ m/\b(SELECT|UPDATE|DELETE)\b/);
Then, @cmd would have to be checked by your rules defining "nested."


* "Something like this" means that this is 1) not tested and 2) not guaranteed to even vaguely resemble what you want. I've been reading too many software licenses...

emc

Any New York City or Connecticut area jobs? I'm currently unemployed.

There are some enterprises in which a careful disorderliness is the true method.

—Herman Melville