I have tried to OCR program listings before, with
rather
poor results.
I OCR'd a sizable manuscript written on a pretty shabby portable typewriter.
I scanned each page twice, making sure to move the paper between scans.
Then I ran both diff (by words, not lines) and spell to smoke out trouble.
The word list for a program listing is quite short and easy to generate.
(Print a list of all the apparent words and visually eliminate the nonsense.)
And a spell check is an easy pipeline of standard utilities.
doug