1/22 In perl, how do I read a set of vars from a .*rc file? In bash,
I'd just say ". $HOME/.foorc" and all the varname=value pairs come
into scope. What's the perl equivalent?
\_ perldoc -f require
perldoc -f use
\_ Both of these require the use of perl's package syntax in
the .rc file. I'm looking for something simpler.
\_ They don't -- just write your rc file with lines like
$variable = "value";
\_ require 'filename.pl';
... use the variables you set in that file...
The only trick is that filename.pl has to end with a positive
value... just make the last line of the file:
1; ##dbushong
1;
\_ Ladies and gentlemen, we have a winner! |