This is what I most often use perl for:
receiving data from whatever source hack it with my swiss army chain saw, so it doesn't trouble me any more.
I even carved a html2php parser, which takes a piece of html and generates echo commands with all the right quotes. So when I use php with heavily mixed code and html, I tell the designer to give me his code, and in a matter of seconds I have my php-statements. Might seem a bit strange, but I like Perl.
neophyte