Text::Glob implements glob(3) style matching that can be used to match against text, rather than fetching names from a filesystem.