my %data = map {s/\.\d+//g; /(.+)\s+\|\s+(.+)/; $1 => $2 } read_file $test2;