He was unable to do it on the fly. We were pretty sure he was not going to pass the tech interview, and he told me he could not code it while I waited. But he asked if I could sent it to him and let him try anyway. Fine. I figured it might give me some insight to him in case I tried to place him somewhere else.
He sent it back 2 hours later. It worked. It was OK designed. But it was obvious he had never read a Perl book. He was an Awk programmer who probably did an occasional hack of other people's Perl code.
He confused single item slices with hash items. He did not use strict or warnings. He did not close his files. But he did error on open fails, and the code was neat and well commented, including closing braces. I suspect he might of done a bit of CGI.
I wonder what level of effort it took?
I might find some PL/I or mainframe BAL work for him.