in reply to regex variables
It does so work! :) Did you try it? Result:
A few tips, then:yep, we ski in dec
- If you'll be matching against the same variable (like $date) multiple times, use the /o operator. That way Perl will only compile the regex once, not each time through the loop.
- You could also compile such a regex using the qr operator. Check that out, as well.
- Of course, in this case, you might want to just use eq. :)
In Section
Seekers of Perl Wisdom