in reply to Re: perl CGI
in thread perl CGI

This is correct. The #!/usr/bin/perl acts like a special kind of a comment for a Unix program when that file has X permission. Also, Unix doesn't use file extensions to decide what kind of file it is looking at....it looks at the first part of the file to figure this out. If you say test whether some file is binary or not, Unix will look inside the file (and at more than just the first line...to decide binary or not)

In a Windows environment this first line is NOT meaningless!
If you have as first line: "#!/usr/bin/perl -w", Windows won't pay attention to the path /usr/bin/perl, but it WILL pay attention to the "-w", which means enable run time warnings.

In Windows, you can associate .pl,.pm,.plx or whatever you want with Perl execution. The problems that I've found with Windows shell is that sometimes, you have to explicitly say: perl somefile.pl <infile >outfile to get the shell to do re-direction in the right way. You can just type "somefile" for normal execution of somefile.pl if you don't have shell input/output. I haven't figured out why this quirk exists in Windows, but I'm sure that it does. Perhaps somebody out there knows the "guts" of this?