On 7/6/07, Vaughn Treude <vltreude@deru.com> wrote:
Quick perl question:
I'm trying to run a perl script that is executable; that is, the file
has "x" permission and starts with this line:

#!/usr/bin/perl -w

There's a parameter in this script that's not defined by default, for
example

my $foo; # no default

If foo is not set, the script exits with an error.  Normally I would
just modify the script but this script gets extracted from a shell
script that has the perl script and an rpm embedded in it.  (How they
did that I don't know.)  So I would expect there's a way to do this, but
there were  no help files with the script.

The shell script invokes the install file like this:
./install_script *$

So I know that I can pass one or more arguments to the outer shell
script and they will get passed verbatim to the perl script.

Is there a to pass a value for foo into the script without modifying the
script?

Thanks in advance,
Vaughn
---------------------------------------------------
PLUG-discuss mailing list - PLUG-discuss@lists.plug.phoenix.az.us
To subscribe, unsubscribe, or to change your mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss

I do not know Perl,
but maybe if you find a perl FAQ on the web,
you can search for something about a
   "persistent variable"
or s. like that...  if that's what it is.
Just a guess, from
--
Mike Schwartz    
Glendale  AZ
schwartz@acm.org
Mike.L.Schwartz@gmail.com