in reply to Use strict.

I get the same error message when using 'my' also. How do I correct this?

Call perl, as in perl path/to/myprogram.pl

See perlrun, Behind the GUI lives the Shell, Shebang