$ ./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.