in reply to #!/usr/bin/perl vs. -*- perl -*-
with #!/your/path/to/perl you force the use of a specific version of perl to be executed.
The line #-*- perl -*- is for someone using emacs, and can be dropped. It should force emacs to use perl syntax highlighting, even if the command itself is a shell.
The exec perl -x $0 "$@" line in the sh script executes the first perl executable found in $PATH, and would be somewhat equivalent to a header like #!env perl, which won't run on some systems. In both cases you have the risk of using modules that are not installed in either. Personally I always use the #!/my/personal/perl version.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: #!/usr/bin/perl vs. -*- perl -*-
by Bloodnok (Vicar) on Jan 20, 2009 at 12:11 UTC | |
|
Re^2: #!/usr/bin/perl vs. -*- perl -*-
by why_bird (Pilgrim) on Jan 23, 2009 at 12:35 UTC |