How to validating the parser in perl