Xref: utzoo comp.unix.questions:29881 comp.unix.sysv386:6426 comp.lang.perl:4722 Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!uwm.edu!ogicse!iwarp.intel.com!news From: merlyn@iwarp.intel.com (Randal L. Schwartz) Newsgroups: comp.unix.questions,comp.unix.sysv386,comp.lang.perl Subject: Re: #! problems Message-ID: <1991Mar28.215544.5391@iwarp.intel.com> Date: 28 Mar 91 21:55:44 GMT References: <4723@cocoa7.UUCP> Sender: news@iwarp.intel.com Reply-To: merlyn@iwarp.intel.com (Randal L. Schwartz) Followup-To: comp.unix.questions Organization: Stonehenge; netaccess via Intel, Beaverton, Oregon, USA Lines: 20 In-Reply-To: protofan@motcid.UUCP (Mike S. Protofanousis) In article <4723@cocoa7.UUCP>, protofan@motcid (Mike S. Protofanousis) writes: | What do I need to do so that I don't have to type 'perl script' to run | my perl script? No, I don't want to use an alias. This is on the manpage, as well as being (at least twice) in The Book. Put: eval '(exit $?0)' && eval 'exec /usr/bin/perl -S $0 ${1+"$@"}' & eval 'exec /usr/bin/perl -S $0 $argv:q' if 0; at the beginning of your program. Be sure to make the file executable (chmod +x filename). print "Just another Perl hacker," -- /=Randal L. Schwartz, Stonehenge Consulting Services (503)777-0095 ==========\ | on contract to Intel's iWarp project, Beaverton, Oregon, USA, Sol III | | merlyn@iwarp.intel.com ...!any-MX-mailer-like-uunet!iwarp.intel.com!merlyn | \=Cute Quote: "Intel: putting the 'backward' in 'backward compatible'..."====/