Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: list dir contents, w/o some stuff

by Chrisf (Friar)
on Jan 14, 2002 at 12:24 UTC ( [id://138543]=note: print w/replies, xml ) Need Help??


in reply to list dir contents, w/o some stuff

Also bad newbie code, but should do it for you ;-)

use strict; my (@files, @printThis); my $contentDir = './'; opendir(DIR, "$contentDir") || die "Can't open dir: $!"; @files = readdir(DIR); closedir(DIR); foreach (@files) { if ($_ !~ /^\.+/) { push @printThis, $_; } } # then print out your content

Update: Move along, nothing to see here ;-)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (1)
As of 2024-04-25 01:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found