in reply to subroutine within regex quantifier?
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.while ( $target_letters !~ /^[a-z]{$Word_Length}$/i ) { ...
In Section
Seekers of Perl Wisdom