[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Omaha.pm] Pulling in a hash via "exec"...FAIL



On Aug 6, 2008, at 5:08 PM, Dan Linder wrote:
sub retrieve_fields {
        my ( $file )=@_;
        my %fields;
        open(FILE, $file)
        {
                local $/;
                eval <FILE>;
        }
        return %fields;
}

Have you tried this instead?

sub retrieve_fields {
        my ( $file )=@_;
        my $fields;
        open(FILE, $file)
        {
                local $/;
                eval <FILE>;
        }
        return $fields;
}

HTH,

j