Don't ask to ask, just ask | |
PerlMonks |
Isn't glob annoying? (somehow)by PetaMem (Priest) |
on Aug 02, 2002 at 08:35 UTC ( [id://187019]=perlquestion: print w/replies, xml ) | Need Help?? |
PetaMem has asked for the wisdom of the Perl Monks concerning the following question:
Hello brothers, I've stumbled across the following code: It seems unelegant and unrobust to me, so I investigated a little bit further. To my surprise I found a strange behaviour of glob, when a glob is given that does not match but that does not contain wildcards also. Given the folowing examples: assume you have the files file1 and file2 in the directory glob is searching, the returns are 'file1' for @t1, '1' for @t2, 'file2' for @t3 and the empty list for @t4. The behaviour for @t2 is what seems odd/annoying. In my opinion it should be empty, as the current semantics make it indistinguishable from the @t3 case - which is correct imho. Please tell me, that I've found a bug that is soon to be fixed... :-}
Bye
Back to
Seekers of Perl Wisdom
|
|