my %path; $path{$_}=$path{$_} || 1 + keys %path for split /$sep/,$path; #### my %path; $path{$_}||=keys %path for split /$sep/,$path;