in reply to getting hashes out of config files

You need to read data from the file before you try to operate on it. eval operates on $_ in lieu of arguments, so you need to put something into $_ first:
open(FILE, "< filename") or die "filename: $!"; { local $/; $_ = <FILE>; } close(FILE); eval;
Or you could just use Perl's do function:
do "filename" or die "filename: $! ($@)";