With Path::Tiny and using the children method:
use Path::Tiny 0.028; my $dir = path ('/path/to/dir'); # Retrieve all entries except '.' and '..' my @all = $dir->children (); # Alternatively, retrieve a subset - here just the perl scripts my @perl = $dir->children (qr/\.pl$/);
In reply to Re: How do I read a directory?
by hippo
in thread How do I read a directory?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |