A
Alex
Hello,
I'm trying to figure out how to "glob" lists instead of the current
directory. For example:
my @var = File::Glob::bsd_glob('a*');
foreach my $f (@var) {print $f, "\n";}
This fragment will print all the filenames started with 'a' in the
current directory.
I need some function which doesn't depend on the file system. For
example
my @set = ('ab', 'ac', 'bc');
my @var = new_bsd_glob('a*', @set); # <---- non-existing function
with additional parameter
foreach my $f (@var) {print $f, "\n";}
It must work exactly as shell globbing, so it should print 'ab' and
'ac'.
I suspect this "new_bsd_glob" function already exist - could you
please advice where it resides?
Thanks
Alex
I'm trying to figure out how to "glob" lists instead of the current
directory. For example:
my @var = File::Glob::bsd_glob('a*');
foreach my $f (@var) {print $f, "\n";}
This fragment will print all the filenames started with 'a' in the
current directory.
I need some function which doesn't depend on the file system. For
example
my @set = ('ab', 'ac', 'bc');
my @var = new_bsd_glob('a*', @set); # <---- non-existing function
with additional parameter
foreach my $f (@var) {print $f, "\n";}
It must work exactly as shell globbing, so it should print 'ab' and
'ac'.
I suspect this "new_bsd_glob" function already exist - could you
please advice where it resides?
Thanks
Alex