We don't bite newbies here... much | |
PerlMonks |
Re: Calling a Variable from another fileby tlm (Prior) |
on Jun 22, 2005 at 13:47 UTC ( [id://469015]=note: print w/replies, xml ) | Need Help?? |
I've never actually done what I'm about to propose, so there may be pitfalls I haven't thought of, but assuming that the assignment to my $res is the last executable statement in mydata.pl, I would try something like That should be equivalent to assigning to $whatever the value returned by eval'ing the contents of mydata.pl. I question the whole approach on design grounds, however. See this thread for some possible alternatives. the lowliest monk
In Section
Seekers of Perl Wisdom
|
|