#!/usr/local/bin/perl use strict; use File::Find; my $mail_to = 'perlmonk@perlmonks.org'; my $subj = 'FTP report'; my $date = scalar localtime; my @deletions; # Let's define the paths. my $one_month = '/ftp'; my $one_week = '/ftp/ftp/incoming'; # Traverse desired filesystems my $days = 30; File::Find::find({wanted => \&wanted}, $one_month); my $days = 7; File::Find::find({wanted => \&wanted}, $one_week); # Send the report. open(MAIL, "|/usr/lib/sendmail -t ") || die "Can't open sendmail: $!"; print MAIL <