🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #12474

Re: anyone using newscan?

#12474
From: Tom Christiansen
Date: Mon, 07 Nov 1994 18:52
29 lines
1880 bytes
:-> In news.software.readers, campbell@neosoft.com writes:
:Also, my perl location is not /usr/bin/perl, and it took me a while to sort out
:why the script was NOT working unless I used a "perl newscan -e" command...

There's a good reason why the perl installation really wants
to make /usr/bin/perl a symlink to where it really is.

Barring that, one could ship software with this header:

       #!/bin/sh -- # find the right perl
       eval 'exec perl $0 -S ${1+"$@"}'
	   if 0;

which usually suffices at the cost of an extra exec.

Even more devious is the triglottal construct following, which 
works even if you start the script with sh, csh, or perl:

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


--tom
-- 
Tom Christiansen      Perl Consultant, Gamer, Hiker      tchrist@mox.perl.com

Maturity is only a short break in adolescence.
                -- Jules Feiffer
Technical Details
Message-ID: <39lt16$qtg@csnews.cs.Colorado.EDU>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.readers.mbox.zip!nntp.gmd.de!Germany.EU.net!news.dfn.de!swiss.ans.net!europa.eng.gtefsd.com!uhog.mit.edu!news.mathworks.com!news.alpha.net!uwm.edu!lll-winken.llnl.gov!overload.lbl.gov!agate!boulder!csnews!mox!tchrist
References: <398cvb$dol@uuneo.neosoft.com> <1994Nov4.185722.13229@chemabs.uucp> <39lnt0$kaa@uuneo.neosoft.com>

Show Full Headers
Complete Article Headers
Message-ID: <39lt16$qtg@csnews.cs.Colorado.EDU>
Subject: Re: anyone using newscan?
Date: Mon, 07 Nov 1994 18:52:22 +0000
From: Tom Christiansen <tchrist@mox.perl.com>
References: <398cvb$dol@uuneo.neosoft.com> <1994Nov4.185722.13229@chemabs.uucp> <39lnt0$kaa@uuneo.neosoft.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.readers.mbox.zip!nntp.gmd.de!Germany.EU.net!news.dfn.de!swiss.ans.net!europa.eng.gtefsd.com!uhog.mit.edu!news.mathworks.com!news.alpha.net!uwm.edu!lll-winken.llnl.gov!overload.lbl.gov!agate!boulder!csnews!mox!tchrist
Newsgroups: news.software.readers
Organization: Perl Consulting and Training
Lines: 29
Reply-To: tchrist@mox.perl.com (Tom Christiansen)
NNTP-Posting-Host: perl.com
Originator: tchrist@mox