Why don't I get any syntax errors when I execute my Python script with Perl? Why don't I get any syntax errors when I execute my Python script with Perl? python python

Why don't I get any syntax errors when I execute my Python script with Perl?


From perlrun,

If the #! line does not contain the word "perl" nor the word "indir" the program named after the #! is executed instead of the Perl interpreter. This is slightly bizarre, but it helps people on machines that don't do #! , because they can tell a program that their SHELL is /usr/bin/perl, and Perl will then dispatch the program to the correct interpreter for them.

For example,

$ cat a#!/bin/catmeow$ perl a#!/bin/catmeow