in reply to Re^6: Find images regardless of filetype extension.
in thread Find images regardless of filetype extension.
Compactness affects readability. And besides, you're counting declarations and braces as lines, if I put it on one line it doesn't mean it's a single statement... if you're looking for compactness, here goes:
I'll assume @files and @dirs are already declared then.map {$d="$dir/$_";$r= -d $d?\@dirs:\@files;push @$r,$d;} grep {!/^\./} + readdir DIR;
Yes, this uses map in void context, but you want compactness, not efficiency :)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^8: Find images regardless of filetype extension.
by zzspectrez (Hermit) on Aug 02, 2005 at 05:10 UTC |