my %hashrow; @hashrow{ qw[ Date Type Amount Ending_balance ] } = split '&', $_; #### my %hashrow; @hashrow{Date} = $row[0]; @hashrow{Type} = $row[1]; @hashrow{Amount} = $row[2]; @hashrow{Ending_balance} = $row[3];