in reply to Find common prefix from a list of strings

Though the problem's well and answered by the time I got to this, it did strike me that Text::Abbrev would sort of work to solve this.

Indeed, if you do:

%abbrevs = abbrev(@files); @possibles = sort { length($a) <=> length($b) } ( keys(%abbrevs) );

the first entry in @possibles is most of the way to the solution. I don't have time to look into this further, alas, but it might be another way to do it.

--
bowling trophy thieves, die!