From: Clifford Heath Date: 2003-05-09T13:56:45+09:00 Subject: Thanks, and problems with Dir.glob ahoward wrote: > 'foo*bar?baz'.scan /[*?]|[^*?]+/ Magic, thanks. Must read that book again :-). New problem: Dir.glob. I'm finding the following misbehaviour: 1) If the pattern contains a space in a directory name, a matching directory doesn't. 2) Placing '?' in a pattern can result in no matches. I did this as a work-around to the previous problem, where the filenames contain multiple spaces, the pattern multiple ?s. 3) Using the space character in the filename part of a pattern can cause *two* complete sets of matches, i.e. the filename array has a complete second copy appended. I worked around it with uniq! Are these known problems with 1.6.8 on Linux? What's wierd is that Perl's glob on Windows (both the built-in one and the File::DosGlob module) are broken also, each in different ways. Coincidence? Why is this stuff hard to get right? Clifford.