the compiler thinks that $next_word[$BEL_LETTERS] is member $BEL_LETTERS of array @next_word.
Use ${nextword}[$BEL_LETTERS]. It's documented in perldata, search for "there is an unfortunate ambiguity".
--
David Serrano
In reply to Re: variables in regex character classes
by Hue-Bond
in thread variables in regex character classes
by amir_e_a
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |