Update CPParser.pl

Simplify code logic in data_parser.