Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: subroutine within regex quantifier?

by dws (Chancellor)
on Dec 04, 2001 at 09:36 UTC ( #129267=note: print w/replies, xml ) Need Help??


in reply to subroutine within regex quantifier?

while ( $target_letters !~ /^[a-z]{$Word_Length}$/i ) { ...
Whether you find a way to use WORD_LENGTH directly or not, you might wish to ensure that the regex is compiled exactly once. /o is your friend.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (4)
As of 2020-10-31 21:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (291 votes). Check out past polls.

    Notices?