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

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...
--
Mike

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://158876]
help
Chatterbox?
SuicideJunkie replaces stale cookies with fresh on the platter on the sideboard.
[SuicideJunkie]: So, possibly interesting thing; I had that script which was using more than all the ram to open an absurdly large spreadsheet. I set it up to spin overnight nightly, so it stopped releasing memory since it was never fully exited.
[SuicideJunkie]: Didn't expect that to be a problem. There's plenty of disk space for swap, and the memory space would be reused the next day. But apparently virtualbox dies with a guru meditation when there's no physical memory unused on start.

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2017-04-26 22:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (491 votes). Check out past polls.