in reply to why isnt it working?

The Idiot's Guide to Solving Perl CGI Problems has your answer.

Don't let the name put you off. I had to refer to it for my first Perl CGI scripts, too.