$ echo 'package Tom;' > foo.pl $ chmod u+x foo.pl $ ./foo.pl package: not found #### $ ./foo.pl 2>&1 | splain package: not found (#1) (A) You've accidentally run your script through the Bourne shell instead of Perl. Check the #! line, or manually feed your script into Perl yourself.