in reply to variables in regex character classes

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

  • Comment on Re: variables in regex character classes