in reply to strange behavior of csh_glob versus bsd_glob

Hi bcrowell2,

If you peek into the source for File::Glob, you'll see that csh_glob is a separate, undocumented method, which is not directly related to the method GLOB_CSH (which is documented, and just sets a bunch of flags).

Furthermore, there's a comment:

# NOTE: The glob() export is only here for compatibility with 5.6.0. # csh_glob() should not be used directly, unless you know what you're +doing

And finally, you'll see that there's a hash %iter (documented as "## borrowed heavily from gsar's File::DosGlob"), which is used the very first time to hold the results from dos_glob, and after that, returns the next value in the already-created list.


s''(q.S:$/9=(T1';s;(..)(..);$..=substr+crypt($1,$2),2,3;eg;print$..$/

Replies are listed 'Best First'.
Re^2: strange behavior of csh_glob versus bsd_glob
by bcrowell2 (Friar) on May 19, 2007 at 19:57 UTC
    Hi all,

    Thanks very much for the replies.

    I originally just used the <> operator, which had the same behavior as csh_glob(). I could just as well have titled this "strange behavior of <> versus bsd_glob." It seems odd to me that <> would have this behavior, but anyway, now I know how to fix the problem: don't use <>, use bsd_glob.

    Thanks! -Ben