use Tie::File::AsHash; tie my %hash, 'Tie::File::AsHash', 'filename', split => ':' or die "Problem tying %hash: $!";