The perhaps-even-lower-tech way to go is a "do" statement. Create a file in which you define all your vars (e.g., ".myapprc"):
$foo = "Foo";
@bar = qw/B a r/;
%blah = ( b => 'l', a => 'h' );
Then, just "load it up" in your script:
#!/usr/bin/perl -w
use strict;
our($foo, @bar, %blah);
do "xyzrc" or die "xyzrc: $!\n";
I use this quite a lot, usually with a little more error checking (see "perldoc -f do"), in CGI scripts that need to source external info (database/table names, etc.)
--
"Language shapes the way we think, and determines what we can think about."
-- B. L. Whorf
|