in reply to Re: Bug in glob2pat?
in thread Bug in glob2pat?

Fair comment, but I'm not sure that escaping the hyphen is legal. From the linux man pages:
One can remove the special meaning of '?', '*' and '[' by preceding them by a backslash. No mention of '-'. I have just waded through IEEE Std 1003.2 and that make no mention of escaping hyphen either, although it is probably open to interpretation.
Having said all that, it can be fixed by adding:'\\' => '\\', to the hash.