Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

Re: installing modules

by RMGir (Prior)
on Apr 14, 2002 at 01:20 UTC ( #158876=note: print w/ replies, xml ) Need Help??

in reply to installing modules

Another problem that the others did not mention is that readdir will return file NAMES, not full paths.

If you do:

my $dir='h:\test'; opendir(DIR, $dir) || die "Unable to open directory: $!"; my @file_names = grep {-f $_} map "$dir\\$_",readdir(DIR); closedir(DIR);
you'll wind up with a list in @file_names of the full paths of the files, and ONLY the files, in that directory.

You could also add a grep on /mp3/i in that list to make sure you only get the mp3 files, since those are what you're looking for...

Comment on Re: installing modules
Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (7)
As of 2015-11-27 12:22 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (727 votes), past polls