#!perl use strict; use warnings; use File::Find; my $dir = shift; die 'No directory' unless $dir; find( sub { # $File::Find::dir is the current directory name, # $_ is the current filename within that directory # $File::Find::name is the complete pathname to the file. # Process file here... }, $dir ); __END__