in reply to Re: Parse::Lex error message
in thread Parse::Lex error message

Parse::Lex passes a Parse::Token object to the sub. You can print the name of the token that has been matched using the "name" method. However, the method can not be executed since a token object is not passed for some some reason. On shorter strings the lexer works, but with the long string in the example it fails.