in reply to parsing a pdf with CAM::PDF

Look at CAM::PDF documentation for parseAny, it clearly takes PDF as input, not a bunch of feeble attempts at regular expressions

You want to use getpdftext.pl - Extracts and print the text from one or more PDF pages

I'm beginning to think you're some kind of troll