|P is for Practical|
How to define a list of regular expressions?by pat_mc (Pilgrim)
|on Jul 01, 2009 at 09:48 UTC||Need Help??|
pat_mc has asked for the
wisdom of the Perl Monks concerning the following question:
I have the following question for ye today: How can I define a list of regular expressions over which I subsequently want to iterate?
So far, I have tried the following, alas to no avail:
Syntax highlighting in my editor already informs me that this is syntactically unacceptable. I also tried various ways of quoting the entries in the list ... but none of them worked. The error message received is
Presumably, it is just a small thing I am overlooking -- but I simply cannot get it. Ideally, what I want is a list of compiled regular expressions that I can simply fetch using shift and interpolate where needed. Your help in this matter hence would be much appreciated.
Thanks a lot in advance and best regards -