// I am making the assumption that the syntax // error here is just a typo ( missing a $ in front // of the second thes_name) . $thes_name{$fields[1]} = thes_name{$fields[1]}++;