We have a set of questions for new hires. I'm trying to think up a new one that would both be of a enough difficulty, see if they think to use any modules from CPAN, lead to plenty of talking points during an interview, and be relevant to the sort of things we do here.
We need a utility called fixlinks. Its job is to take an html file, convert all the links inside it to absolute ones, then save the output. It should take three command line arguments, an input filename, an output filename, and the link base.
Implement this program (in Perl).
Consider the edge cases in both determining a link and making a url absolute; create a program to test these cases.
How well does it handle html that is not technically valid, yet works in a browser?
Does this seem sensible? What would you write?