If not, is this other method (that I know I can do in Perl) a good solution?
Even though the answer to the first question is No, I answered it because I think being honest about the limitations of Perl (or HTTP, in this case) is valuable, and because I found the implied second question interesting.
Giving people alternate approaches which can be done in Perl is a big plus, in my book.