... normally you run a perl script like this (assumes perl is in the command path):
perl nameofscript < filename
Sorry Kevin, but that's not the normal way to execute a perl script, but it is one of the methods that can be used.
The normal and preferred way is simply:
nameofscript.pl < filename