#!/usr/bin/perl use strict; use File::Find; find (\&wanted, '.'); sub wanted { next if -d; # skip if it's a directory # $_ is the name of the file # $File::Find::name is the full path and name to the file print "$File::Find::name\n"; }