On 11-06-12 06:40 AM, eventual wrote:
I've read perldoc File::Find but I dont understand. So If I wish to search for "mp3" in d:\ and all its sub-directories, and to print it out if found, How should I write?
Try: my @Music_files = (); use File::Find; find( \&want_mp3, 'd:\\' ); print "$_\n" for sort @Music_files; sub want_mp3 { push @Music_files, $File::Find::name if $_ =~ /\.mp3$/; } -- Just my 0.00000002 million dollars worth, Shawn Confusion is the first step of understanding. Programming is as much about organization and communication as it is about coding. The secret to great software: Fail early & often. Eliminate software piracy: use only FLOSS. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/