use IO::File; my $fh = new IO::File; $fh->open("<$usrhash") or die ......; $fh->untaint(); flock($fh, LOCK_SH) or die..........; $/=undef; eval <$fh>; $fh->close(); $/="\n"; my %newhash=%$USRLST1; # the reference as created by Data::Dumper