[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: #!/Perl question


On Thu, 2 Sep 1999, Brian Servis wrote:

> *- On  2 Sep, Jonathan Markevich wrote about "Re: #!/Perl question"
> > On Fri, Sep 03, 1999 at 03:04:49AM +0800, Hans van den Boogert wrote:
> >> I'm trying to learn some Perl. I found an on-line book which is Unix
> >> biased, but the scripts all start with #!/usr/local/bin/perl (which makes
> >> sense if you have compiled and installed it yourself). However, on my
> >> Debian system Perl was of course put in /usr/bin/perl. So how can I write a
> >> Perl script that be executed on a variety of systems (Unix/Linux/DOS)?? 
> > 
> > Personally, I would count on /usr/bin/perl.  It seems unusual to take such
> > an important key to lots of system-based scripts and keep it local.  Check
> > out this:
> I think(i.e. just my local experience) many of the commercial Unix's put
> everything under /usr/local that is not part of the core OS.  Unlike
> Linux distributions most commercial Unix's don't come with all the apps
> pre-packaged.

One solution would be to write a makefile that detects the location of the
perl binary and then prepends the proper shebang line to the beginning of
your perl programs.

- -- 
  finger for PGP public key.

Version: 2.6.3ia
Charset: noconv


Reply to: