t57:
#!/usr/bin/perl -w use strict; our %CONFIG = (key => 'value'); require 't57.pl';
t57.pl:
warn "\$CONFIG{key}: $CONFIG{key}\n"; 1;
In reply to Re: use variable from main file in a 'require'd file?
by sgifford
in thread use variable from main file in a 'require'd file?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |