in reply to seeing all files in a directory

Here's an even shorter way to grab all .txt files from the current directory:

  @files = <*.txt>;

Note that you can still put path info in front of the expression like this:

  @files = <./*.txt>;

or this:

  @files = <../../*.txt>;

but the filenames stored in your array will contain the "./" or "../../"

ryddler

Replies are listed 'Best First'.
Re: Re: seeing all files in a directory
by Gerard (Pilgrim) on Oct 08, 2001 at 17:20 UTC
    It doesn't get much simpler than that.