use strict; tie my %hash, 'Tie::NameThis', 'myupdowntimes.dat'; # Now, assign to or access $hash{machine}{UP} and $hash{machine}{DOWN}