in reply to On running perl scripts
The #!/usr/bin/perl (often called the shebang line) tells a *NIX shell to load the given interpreter when it tries to execute a file.
The #! part is the ascii representation of a 'magic number' that the unix shell uses to determine file type. This one tells the shell to load up the given interpreter. If you leave this out the file will not exececute with ./filename. If you run perl and give it a filename perl will try to compile and run the contents of the file. To do this it does not need the shebang line and will skip it if it is there, the file will run just fine (assuming it is valid perl code)
Cheers,
R.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: On running perl scripts
by gellyfish (Monsignor) on Feb 07, 2005 at 13:49 UTC | |
by Random_Walk (Prior) on Feb 07, 2005 at 15:26 UTC | |
| A reply falls below the community's threshold of quality. You may see it by logging in. |