Reputation: 602
I'm looking for something like this require "peacefullscript.pl -whiteflag";
the problem that this one doesn't work. What I want is to call a script with some flags and get the global variables it creates into the current script.
How can I do this easily?
Upvotes: 3
Views: 81
Reputation: 118605
{
local @ARGV = ("-whiteflag");
do "peacefullscript.pl";
}
The local
keyword creates a temporary copy of @ARGV
that won't overwrite your original command line arguments.
Upvotes: 5