in reply to Glob Misbehavin'
... or a loopmy @txt = glob("$dir/*.txt");
When you call glob in a scalar context, it returns the file the first time, then returns nothing the next time to let you know there are no more files.while ( defined(my $txt = glob("$dir/*.txt")) ) { }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Glob Misbehavin'
by Hofmator (Curate) on Jun 14, 2001 at 17:15 UTC |