$ a.pl
sh: ./a.pl: usr/bin/perl: bad interpreter: No such file or directory
and that's what produced the error messages.
No. If the error messages originated from sh, they would look like
$ . a.pl
sh: =: command not found
sh: ./a.pl: line 3: syntax error near unexpected token `{'
sh: ./a.pl: line 3: `if ($count <= 20) {'
or (requires changing shebang to #!/bin/sh)
$ a.pl
./a.pl: line 2: =: command not found
./a.pl: line 3: syntax error near unexpected token `{'
./a.pl: line 3: `if ($count <= 20) {'
The error the OP gave is indeed from perl. |