use strict; use File::Find; my $dir = "/some/dir/in/linux"; File::Find::find (\&search, $dir); sub search { if (-f $_) { print "$_\n"; } }