location=dungeon name=corwin weapon=grayswandir #### my %data = (); # initialize hash while () { # assume you have the file open already my ($key, $value) = split(/=/, $_, 2); $data{$key} = $value; } #### $data{$arrname} = \@array; # or $data{$arrname} = [ @array ];