use v5.8.8; use strict; use warnings; use File::Find; sub wanted { # $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. print "[$File::Find::dir], [$_], [$File::Find::name]\n"; } sub main() { my $arg= shift @ARGV; print $arg, "\n"; find ({wanted => &wanted }, $arg); } main;