"be consistent" | |
PerlMonks |
Re: some regex helpby Roy Johnson (Monsignor) |
on Apr 05, 2004 at 21:47 UTC ( [id://342770]=note: print w/replies, xml ) | Need Help?? |
I'm not sure how to go about dynamically creating variables like thisThe recommended alternative is to use a hash, where ABC is a key, rather than a variable name.. Your regexen are fine. For the last example, you should use \w* instead of .*, as the latter will capture whitespace. If your expression should accept embedded whitespace (or other non-\w chars), it gets a little trickier. The PerlMonk tr/// Advocate
In Section
Seekers of Perl Wisdom
|
|