I think it suffices to escape the input: glob("\Q$file\E/*")
$ find .|od -c
0000000 . \0 . / t h i s ' i s ' a
0000020 t e s t f i d \0 . / t h i s '
0000040 i s ' a t e s t f i d / w i
0000060 b l e * h e l l o \0 . / t h i
0000100 s ' i s ' a t e s t f i d
0000120 / w i b l e * h e l l o / f o
0000140 o b q u x \n h e l l o \0 . / t
0000160 h i s ' i s ' a t e s t f
0000200 i d / w i b l e * h e l l o /
0000220 f o o b q u x \n h e l l o / b
0000240 a r \0
0000243
$ perl -e 'sub _{($f)[EMAIL
PROTECTED];print"$f\0";map{_($_)}glob("\Q$f\E/*")}_(".")'|od -c
0000000 . \0 . / t h i s ' i s ' a
0000020 t e s t f i d \0 . / t h i s '
0000040 i s ' a t e s t f i d / w i
0000060 b l e * h e l l o \0 . / t h i
0000100 s ' i s ' a t e s t f i d
0000120 / w i b l e * h e l l o / f o
0000140 o b q u x \n h e l l o \0 . / t
0000160 h i s ' i s ' a t e s t f
0000200 i d / w i b l e * h e l l o /
0000220 f o o b q u x \n h e l l o / b
0000240 a r \0
0000243
I have uploaded a new version with the fix.
-jonathan
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]