in reply to http referer

No it's not just JS or HTML! The problem is I need to pass the refering url into my PERL script, so this IS a perl problem.