in reply to how to search for a file
in thread Answer: how to search for a file

File::Find is very easy to use, if your program runs on the machine that has mounted the filesystem the file is on. File::Find does not search web servers or ftp servers for files.

Now for some simple example code, more code can be found by using Super Search and searching for "file find" :

use strict; use File::Find; my $startDir = "c:/"; find( sub { # We only want files ending in ".mp3" if ($File::Find::name =~ /\.mp3$/) { print "Found " . $File::Find::name . "\n"; } }, $startDir );