in reply to cgi HTML head error

The error message indicates that your Perl program hasn't even started. The code snippet doesn't behave any different between Perl versions 5.10 and 5.34. The problem is in the server configuration, not in Perl - so that's to debug between your virtual server configuration and your provider. Sorry.