Even you can use do() to include .pl file, as below.
use strict; use warnings; use Data::Dumper; our $config = do '/pathto/config.pl'; print $config->{'foo'};
In reply to Re: What's the right way to include a config file as a .pm bareword?
by vinoth.ree
in thread What's the right way to include a config file as a .pm bareword?
by Cody Fendant
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |