DrWhy has asked for the wisdom of the Perl Monks concerning the following question:
without necessarily knowing ahead of time which directory the script is in. By setting the PATH variable appropriately and putting '-S' in PERL5OPT I can almost get there. The fly in the ointment is that the scripts that can be found and run this way must have the execute bit set on them. Our system doesn't typically set the execute bits on the perl scripts that are a part of it, and I'd rather not introduce this requirement to the existing system.perl scriptname.pl arg1 agr2 ... argn
So I'm seeking the wisdom of the monastery on this. Does anyone know of a way to accomplish this 'script name resolution' capability for scripts that don't have the execute bit set?
NB: perl -S script_not_executable.pl will find the script, but will then complain that script_not_executable.pl is not executable. Set the execute bit and it works.
--DrWhy
"If God had meant for us to think for ourselves he would have given us brains. Oh, wait..."
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Can I get a -S switch that doesn't care about the execute bit?
by Anonymous Monk on Aug 23, 2011 at 02:24 UTC | |
by DrWhy (Chaplain) on Aug 23, 2011 at 02:43 UTC | |
by Anonymous Monk on Aug 23, 2011 at 06:45 UTC | |
by DrWhy (Chaplain) on Aug 23, 2011 at 07:55 UTC | |
by Anonymous Monk on Aug 23, 2011 at 08:24 UTC | |
|