in reply to Use a Variable in a Separate Perl Script
Depends on what you are doing with these two scripts. It might be time to rethink your design. Maybe what you really want to do is create a package with some functions and variables and then put the program logic into a second script.
#MyModule.pm package MyModule; use strict; our $variable = 'hello!';
#MyScript.pl use strict; use MyModule; print $MyModule::variable;
Also, you can use Exporter if you want to add optionality to your exports.
Strange things are afoot at the Circle-K.
|
---|
In Section
Seekers of Perl Wisdom