while() { chomp; my ($count, $type, $a_point, $z_point, $error) = split(/\|/); push @{ $data{$count} }, {type => $type, a_point => $a_point, z_point => $z_point, error => "$error", }; } # while DATA