in reply to Perl Directive
./myscript.pl: Command not found.
This is because the first line is something like: #!/usr/bin/perl^M
("Something like" meaning perhaps you assumed your perl was in another path.) The command that isn't found is perl^M, but the shell's error message can be infuriatingly misleading. At least the first few times your run into it. If you instead get into the habit of always turning on warnings from the shebang line, #!/usr/bin/perl -w^M
...then the OS kernel loads #!/usr/bin/perl correcty, and perl itself is smart enough to do the right thing about subsequent DOS lineendings. Also, you get warnings turned on :)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Perl Directive
by blahblahblah (Priest) on Dec 13, 2004 at 16:43 UTC |