English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

should it be included as the first line following the main function of the file?

2007-03-30 18:12:17 · 4 answers · asked by cartier_2g 1 in Computers & Internet Programming & Design

4 answers

YES!
it's called shebang! It tells unix where to find the program that runs the script. if perl is in /usr/local/bin/ it is correct , if it's in /usr/bin or some place else, it's not needed.

Under windows, it's not required, but still a good practice!

2007-03-30 18:39:54 · answer #1 · answered by jake cigar™ is retired 7 · 1 0

It specifies the path to the perl program and needs to be the first line for a perl script on Unix/Linux based systems.

2007-03-31 03:29:30 · answer #2 · answered by Memphis 3 · 0 0

Yes
it specifies the path of perl

2007-03-31 02:29:59 · answer #3 · answered by Anonymous · 0 0

It must be the first (top) line of the file. It doesn't go anywhere else or after anything.

2007-03-31 01:40:26 · answer #4 · answered by Vegan 7 · 0 0

fedest.com, questions and answers