home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.perl
- Path: sparky!uunet!decwrl!world!dsb
- From: dsb@world.std.com (David Boyce)
- Subject: More #! stuff
- Message-ID: <BtCEuC.1K4@world.std.com>
- Organization: The World Public Access UNIX, Brookline, MA
- References: <1992Aug20.153727.167@cbnews.cb.att.com> <MERLYN.92Aug21092257@romulus.reed.edu>
- Distribution: usa
- Date: Fri, 21 Aug 1992 16:51:47 GMT
- Lines: 18
-
- Sorry if this is old news; I'm a recent reader and can't find a FAQ.
- Anyway, the idiom I use for invoking perl is
-
- #!/bin/env perl
-
- This doesn't attempt to solve any of the non-unix and weird-unix
- problems but it does solve the problem of writing portable scripts,
- given that perl is likely to be installed in different places
- on different machines. I know the camel book argues strongly
- for /usr/bin, but my experience has been that in the real
- world perl is rarely in the same place twice. The above does
- cost an exec, of course, compared to #!/usr/bin/perl. So - is this
-
- a) old and not preferred for some reason,
- b) old and a recommended technique, or
- c) new and I'm a hero for thinking of it? (as if!)
- --
- David Boyce dsb@world.std.com 617-576-1540
-