in reply to
Persistent HTTP connection
If the served UI behaves from a browser
WWW::Mechanize::Firefox
may be a good alternative to what you're doing.
Comment on
Re: Persistent HTTP connection
In Section
Seekers of Perl Wisdom