Well Perl is not PHP
PHP was created specially to do web development, Perl wasn't.
So when you do a print or an echo in PHP de parser adds some important lines so the webbrowser knows what to do with them.
Perl doesn't, there you need to add them yourself.
so what you need to do is this:
print "Content-type: text/html\
the extra print line sends the correct Content-type to the webbroswer so he can display all the following print statements correctly.
That's not very handy... I hear you thinnking.
Wel The perl community wouldn't be the perl community if they can't make it easier you got to love CPAN and the members
If you really want to get into using Perl to develop for the web, you should take a look at the CGI module from CPAN. This will make your life easier. It will automaticly include all special processing which otherwise you need to do by hand:
And type perl cgi into google for some nice tutorials