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 "../../"
In reply to Re: seeing all files in a directory
by ryddler
in thread seeing all files in a directory
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |