in reply to Easier way to do this
Hope that helps,use strict; use File::Find; use File::Basename; my($topdir) = '/'; # where you want to start from my(@files) = find ( \&wanted, "$topdir" ); foreach (@files) { my($dir) = dirname($_); if ($dir ne $prev_dir) { print "<P>" . $dir . "</P>\n"; $prev_dir = $dir; } print "<BLOCKQUOTE>" . $_ . "</BLOCKQUOTE>\n"; } sub wanted { /\.mp3$/ && -f; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: Re: Easier way to do this
by Anonymous Monk on Aug 18, 2000 at 06:47 UTC | |
by Corion (Patriarch) on Aug 18, 2000 at 11:48 UTC |