I'd start maybe looking at Regexp::Trie for inspiration; at least conceptually its similar just you'll be targetting glob semantics rather than regexp.
Edit: Looking at the original question domain (mkpath -p on directory names) I wonder if you might couldn't cheat and work path segment by path segment (split into sections on qr{/} then kind of do a trie-ish thing on each segment). Don't know if that's applicable for the more general question.
The cake is a lie.
The cake is a lie.
The cake is a lie.
In reply to Re: Challenge: Generate a glob patterns from a word list
by Fletch
in thread Challenge: Generate a glob patterns from a word list
by choroba
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |