in reply to Server 500

Try adding the line:
print header(-type=>'text/html');
before:
print <<print_tag;