in reply to Re^6: why am i getting script error 500
in thread why am i getting script error 500

Yes.

Use strict is not a penalty; it's a tool to help you find out what you're doing wrong.

Your previous code generates similar errors. Read perldoc perlvar (and I know there has to be an even better explanation in the documents installed with your perl). Update: See also some of the answers in strict subs and bareword exceptions, non-barewords and use strict and Aristotle's reply in bareword hash keys.

Further, though neither recent nor exhaustive, see http://archives.devshed.com/forums/perl-102/how-to-eliminate-the-bareword-error-2285300.html