in reply to Bug in glob2pat?

Or am I wrong?
Your *fix* will turn [f\-o] into [f\\-o]

Replies are listed 'Best First'.
Re^2: Bug in glob2pat?
by shmem (Chancellor) on Sep 02, 2008 at 17:18 UTC

    That is better written as [-fo] anyways.

Re^2: Bug in glob2pat?
by cdarke (Prior) on Sep 02, 2008 at 15:19 UTC
    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.