Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Answer: How do I read files from a folder and place them into a list?

by ctilmes (Priest)
on Apr 22, 2003 at 15:38 UTC ( #252291=categorized answer: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use File::Slurp;
    
    my $dir = '.';      # or whatever
    
    my @files = sort grep { -f "$dir/$_" } read_dir($dir);
    

Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (7)
As of 2016-12-05 06:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (72 votes). Check out past polls.