Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: How do I read a directory?

by hippo (Bishop)
on Sep 17, 2018 at 11:13 UTC ( [id://1222504]=note: print w/replies, xml ) Need Help??


in reply to How do I read a directory?

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$/);

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1222504]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (5)
As of 2024-04-23 17:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found