home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / lang / perl / 5413 < prev    next >
Encoding:
Text File  |  1992-08-21  |  1.1 KB  |  30 lines

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