"Craig A. Berry" <[EMAIL PROTECTED]> wrote on 12/06/2003 12:14:51 PM:

> Well, doh, the magic number is (as I should have realized) 127.  I
> just had a hard time believing we've never had the result of a glob
> longer than that.  Here are the length values we are actually using
> as we approach and pass 127:

Craig,

While you are in looking at that section of code I'd like to point out that
I've had requests to make vmsperl's glob() as useful as either DCL's
DIRECTORY command or DCL's F$SEARCH() lexical function.
In particular this construct:

   my @c_and_h_files = glob("DEV:[BIGDIR]*.c,*.h");

does not work as users of:

   dir dev:[bigdir]*.c,*.h

would expect it to.  Alternatives include the workaround of calling:

    my @all_files = glob("DEV:[BIGDIR]*.*");

and filtering @all_files in perl, or to glob across BIGDIR twice as in:

   my @c_files = glob("DEV:[BIGDIR]*.c");
   my @h_files = glob("DEV:[BIGDIR]*.h");
   my @c_and_h_files = (@c_files,@h_files);

Both of which seem to perform poorly when BIGDIR truly has a
lot of files in it.

So perhaps there is a better way to handle the arguments
to perl's glob() in an even more VMS friendly way since we have
already eschewed the BSD style glob compatibility to call
lib$find_file().  I just wanted to mention the possibility at this time.

Peter Prymmer

Reply via email to