in reply to Re: list of fles in a directory, but use wildcards like *
in thread list of fles in a directory, but use wildcards like *
to list all files in the directory, opening those files with,opendir DIR, $dir; my @file = grep { $_ ne '.' && $_ ne '..' } readdir DIR; closedir DIR;
would work. But now using the glob, it's dying when open the files in the files list.foreach $file (@file){ open(MYFILE, $dir.$file[$i]) or die qq(Cannot open $file[$i]\n); ....some other stuff
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: list of fles in a directory, but use wildcards like *
by LordWeber (Monk) on Sep 04, 2003 at 17:30 UTC | |
|
Re: Re: Re: list of fles in a directory, but use wildcards like *
by graff (Chancellor) on Sep 05, 2003 at 05:06 UTC |