"Comment on"
Quite an array of replies but many seem to believe that you don't know what OCR is. My interpretation is that you were making a Request for Comment on the Code Snippet or Cool Use for Perl that you wrote, right?
Anyway, to answer the question I think you asked, PDF::OCR::Thorough reportedly does this. It calls OCR (through Tesseract) when needed but will otherwise just extract the text.
Haven't used this module but had planned to. Last thing I needed to 'OCR', I used something very similar to your method. I'm hoping for better results than I got.