This isn't really a Perl question.
However, you are using an HTTP/1.1 feature.
If the server you are connecting to is not
HTTP/1.1 compliant it will not work as you wish.
--
perl -p -e "s/(?:\w);([st])/'\$1/mg"
Comment on Re: How do I retrieve a piece of a file?