Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- globbing mess
January 14, 2006, 6:08 pm
rate this thread
- it_says_BALLS_on_your forehead
January 14, 2006, 9:23 pm
Re: globbing mess
Using readdir/grep is an alternative to globbing.
opendir DIR, $dir or die "could not open '$dir' $!";
my @files = grep /^[^.]/, readdir DIR;
(but you may need to remember to paste the $dir part onto the
front of each array element.
The docs say glob() uses csh rules.
If you tell us why you think that would mess up the code, then
we might be able to clear up whatever misunderstanding you have
that led to that conclusion.
Tad McClellan SGML consulting
firstname.lastname@example.org Perl programming
Fort Worth, Texas
- » FAQ 5.7 How can I manipulate fixed-record-length files?
- — Previous thread in » PERL Discussions