Subject: perl / sh problem
To: (NetBSD/current-users Maillist) <>
From: David Brownlee <>
List: current-users
Date: 01/13/1999 18:01:34
	I', trying to use the standard method of having a shell script
	that runs perl (direct from 'man perlrun')

           #!/bin/sh -- # -*- perl -*- -p
           eval 'exec /usr/bin/perl $0 -S ${1+"$@"}'
               if $running_under_some_shell;

	Actually I'm trying to make it handle a missing perl by taking
	some other action, but the example ebove suffices :)

	If I run the above 'sh' complains about illegal option '--'

	If I just have '#!/bin/sh' I end up in a loop running again
	and again in sh until it hits a resource limit and perl fails
	to link agains (one very bizarre error message until
	you work out what is going on :)

	Does anyone have thoughs on what should happen here - I'd like
	to think our 'sh' should support the example given in the perl
	page unless it violates posix :)


                      Neighbours should be one of:
                a) Understanding   b) Distant   c) Deaf