Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: regex variables

by btrott (Parson)
on Sep 01, 2000 at 03:24 UTC ( [id://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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2024-04-19 14:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found