in reply to RE: RE: RE: RE: getting hashes out of config files
in thread getting hashes out of config files

This works for me:
$ cat test do('test2'); print "var=$var\n"; $ cat test2 $var="test variable"; $ perl test var=test variable
Make sure 'filename' exists and is valid Perl. In addition, each of my examples has included an 'or die...' bit, yet you've consistently ignored this hint. Upon failure, do will return undef and set either $! to an error indicating a failure to read the file, or $@ with an error message describing a compilation or run-time error evaluating the contents of the file. Check for these errors and print them out. I suspect your problem will be clear at that point.
do($filename) or die "$filename: " . ($! ? $! : $@);