in reply to Passing a required script arguments
When you require a file, it's exactly (well, almost exactly) as if you'd just typed those lines right where you put the require statement. Because of this, there isn't really a way to pass arguments.
If what you really want to do is run the script in a new process, just use system as gjb suggested.
If you actually want to require the script, perhaps so you can use its subs or look at its variables, you can pass parameters in a global variable. If the script is expecting parameters in the @ARGS array, just set @ARGS, possibly using local if you want access to the calling program's original copy of @ARGS.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Passing a required script arguments
by Anonymous Monk on Sep 26, 2003 at 15:21 UTC |