in reply to I think regex Should Help Here... but How!?

One possible regex-based approach:

c:\@Work\Perl>perl -wMstrict -le "my $master = 'comp.hw.new.'; ;; my @items = qw( comp.hw. comp.hw.new. comp.hw.hw. comp.sw.old. muse.hw.new. ancient +. ); ;; LEVEL: for my $level (1 .. 4) { print qq{Match Level: $level}; ;; my ($buf) = $master =~ m{ \A (?: [^.]* [.]){$level} }xmsg or print qq{no master match at level $level}; next LEVEL unless defined $buf; print qq{ Master: '$buf'}; ;; for my $str (@items) { if ($str =~ m{ \A (?i) \Q$buf\E }xms) { print qq{ '$str' matches '$buf'}; } else { print qq{ '$str' DOES NOT match '$buf'}; } } } " Match Level: 1 Master: 'comp.' 'comp.hw.' matches 'comp.' 'comp.hw.new.' matches 'comp.' 'comp.hw.hw.' matches 'comp.' 'comp.sw.old.' matches 'comp.' 'muse.hw.new.' DOES NOT match 'comp.' 'ancient.' DOES NOT match 'comp.' Match Level: 2 Master: 'comp.hw.' 'comp.hw.' matches 'comp.hw.' 'comp.hw.new.' matches 'comp.hw.' 'comp.hw.hw.' matches 'comp.hw.' 'comp.sw.old.' DOES NOT match 'comp.hw.' 'muse.hw.new.' DOES NOT match 'comp.hw.' 'ancient.' DOES NOT match 'comp.hw.' Match Level: 3 Master: 'comp.hw.new.' 'comp.hw.' DOES NOT match 'comp.hw.new.' 'comp.hw.new.' matches 'comp.hw.new.' 'comp.hw.hw.' DOES NOT match 'comp.hw.new.' 'comp.sw.old.' DOES NOT match 'comp.hw.new.' 'muse.hw.new.' DOES NOT match 'comp.hw.new.' 'ancient.' DOES NOT match 'comp.hw.new.' Match Level: 4 no master match at level 4

Updates:

  1. Oops... Added  \Q...\E to original  m{ \A (?i) $buf }xms because synthesized pattern contains literal  '.' (period) characters. Output unchanged. (quotemeta-ing would be a good idea in any event.)
  2. graff has observed below that the written specs in ozboomer's OP are just a tad bit vague, and I have to agree. What I did was to assume the output of the code (however rubbishy) given in the OP was correct and, with my understanding of the specs, write code giving essentially the same output.