Forum Moderators: open
I have found a snippet of code that will nearly do the job and am currently coding up the solution. I will post it up here if anyone else is interested.
Are you using HTML::LinkExtor or doing it by parsing the html yourself?