in reply to Variable numbers of folders...
Something like:
You could easily wrap in a foreach block if you have multiple directories specified. LR Whip me, Beat me, Make me use Y-ModemG. Update: Also, I might add, Learning Perl and Perl Cookbook are invaluable resources to have on hand.opendir(DIR, $directory) or die "Failed to open $directory: $!"; while (defined($filename = readdir(DIR))) { #Do stuff to each file $filename } closedir(DIR);
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Variable numbers of folders...
by bioinformatics (Friar) on Jul 28, 2003 at 17:39 UTC |
In Section
Seekers of Perl Wisdom