Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Re: regex variables

by btrott (Parson)
on Sep 01, 2000 at 03:24 UTC ( #30662=note: print w/replies, xml ) Need Help??

in reply to regex variables

It does so work! :) Did you try it? Result:
yep, we ski in dec
A few tips, then:
  • 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. :)
If I misunderstood what you're asking, let me know.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://30662]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (3)
As of 2022-09-30 22:40 GMT
Find Nodes?
    Voting Booth?
    I prefer my indexes to start at:

    Results (126 votes). Check out past polls.