in reply to Re: Passing a required script arguments
in thread Passing a required script arguments
He didn't say he wanted to execute it more than once. If he did, we could add one line to your code:
which executes "foo.pl" 10 times.for (1 .. 10) { require "./foo.pl"; delete $INC{ './foo.pl' }; }
So, even had he wanted to do it repeatedly, it's still doable and the OP's question still did not indicate a broken understanding of perl. That's just your assumption.
Update: Some might take Abigail's comment below to mean that the above is somehow incorrect, and worse, because of his reputation they might believe it without first trying it to see for themselves. For those who might be misled:
$ echo 'print@ARGV' > t; $ perl -le 'for ( 1 .. 3 ) { @ARGV = $_; require"t"; delete $INC{"t"} +}' 1 2 3
-sauoq "My two cents aren't worth a dime.";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Passing a required script arguments
by bart (Canon) on Sep 27, 2003 at 00:02 UTC | |
| A reply falls below the community's threshold of quality. You may see it by logging in. |