#!/usr/bin/perl -w # find_files.plx # this script demonstrates the use of the File::Find module. use strict; use File::Find; my $start_dir = shift or die "Usage: $0 \n"; unless (-d $start_dir) { die "Start directory '$start_dir' is not a directory.\n"; } find(\&process, $start_dir); sub process { # this is invoked by File::Find's find function for each # file it recursively finds. print "Found $File::Find::name\n"; }