Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Navigating and Reading Directories (today)

by Anonymous Monk
on Apr 23, 2015 at 11:06 UTC ( #1124379=note: print w/replies, xml ) Need Help??


in reply to Navigating and Reading Directories

In today, reading directories is easier with Path::Tiny

#!/usr/bin/perl -- use strict; use warnings; use Path::Tiny qw/ path cwd /; my $dir = cwd(); my @files = path( $dir )->children; my @perlFiles = path( $dir )->children( qr/\.pl$/i ); for my $pl ( @perlFiles ){ print "$pl\n"; }

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1124379]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (5)
As of 2018-06-23 09:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?



    Results (125 votes). Check out past polls.

    Notices?