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

Re: #!/Perl question

* Hans van den Boogert <hansfong@mail.geocities.com> writes:

> 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)?? 

Basically form the camel book:

eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' && eval 'exec perl -S $0 $
        if 0;


Colin Marquardt <colin.marquardt@gmx.de>

Reply to: