*name = *File::Find::name; #### use strict; my @found_files = Search_File('c:/Documents and Settings','udefdown.log'); foreach (@found_files) { print "found: '$_'\n"; } sub Search_File { use File::Find (); # for the convenience of &wanted calls, including -eval statements: use vars qw/*name/; *name = *File::Find::name; our ($start_path, $search_name) = @_; our @matching_files = (); if ($search_name) { # Traverse desired filesystems File::Find::find({wanted => \&wanted}, $start_path); } return @matching_files; sub wanted { /^$search_name\z/si && push(@matching_files, $name); } }