in reply to
using HTML::TreeBuilder causes "premature end" error
Try adding
use CGI::Carp qw[fatalsToBrowser];
above the commented line to see if it adds any additional knowledge to your problem.
Comment on
Re: using HTML::TreeBuilder causes "premature end" error
Download
Code
In Section
Seekers of Perl Wisdom