in reply to whats the problem with this line?

Apart from the spelling mistake ;) ... you could use #!/usr/bin/perl -wT; or at least use warnings; to help you debug your code.

This will output warnings as well as error messages to your error log file - /var/log/apache2/error.log on my system.