home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / lang / perl / 7704 < prev    next >
Encoding:
Internet Message Format  |  1993-01-07  |  1.5 KB

  1. Path: sparky!uunet!dove!dove.nist.gov!przemek
  2. From: przemek@rrdstrad.nist.gov (Przemek Klosowski)
  3. Newsgroups: comp.lang.perl
  4. Subject: Re: Problems with "-s" in #! line - help !
  5. Message-ID: <PRZEMEK.93Jan7112756@rrdstrad.nist.gov>
  6. Date: 7 Jan 93 16:27:56 GMT
  7. References: <peter.726325150@hilly>
  8. Sender: news@dove.nist.gov
  9. Organization: U. of Maryland/NIST
  10. Lines: 47
  11. In-reply-to: peter@micromuse.co.uk's message of 6 Jan 93 12:59:10 GMT
  12.  
  13. In article <peter.726325150@hilly> peter@micromuse.co.uk (Peter Galbavy) writes:
  14.  
  15.    If the #! line reads:
  16.  
  17.    #!/usr/local/bin/perl -s
  18.  
  19.    All is OK'ish. But then add a comment for emacs:
  20.  
  21.    #!/usr/local/bin/perl -s        # -*- Perl -*-
  22.  
  23. I think it is a better policy to add 
  24.  
  25. # Local variables:
  26. # mode:Perl
  27. # End:
  28.  
  29. at the end of the file, since different operating systems have different
  30. limits on the length of the #! line, so besides not working, your scripts
  31. may be non-portable :^)
  32.  
  33. I use Wayne Mesard's dmacro package in Emacs, so that every new Perl file
  34. starts this way here:
  35.  
  36.  
  37. #!/usr/local/bin/perl
  38. # Copyright (c) 1993 Przemek Klosowski at NIST. All Rights Reserved
  39. # Filename: new.pl.
  40. # $Id$
  41. # Purpose: 
  42. # Options: 
  43. # History:              przemek - Jan 7, 1993: Created.
  44.  
  45.  
  46. require "getopts.pl";
  47. &Getopts();
  48.  
  49. # Local variables:
  50. # mode:Perl
  51. # End:
  52.  
  53. --
  54.             przemek klosowski (przemek@rrdstrad.nist.gov)
  55.             Reactor Division (bldg. 235), E111
  56.             National Institute of Standards and Technology
  57.             Gaithersburg, MD 20899,      USA
  58.  
  59.             (301) 975 6249
  60.