use strict; use warnings; use File::Find; use File::Slurp; my @starters = @ARGV ? @ARGV : qw(.); my @files; @ARGV = (); find sub { push @files, $File::Find::name if /\.(pl|pm)$/; # or whatever condition here }, @starters; print "Perl files that don't use the stricutres\n"; foreach my $file (@files) { my $text = read_file( $file ) ; print "$file\n" unless ( $text =~ /use warnings;/ && $text =~ /use strict;/ ) ; } #### C:\thomasdata\thomasprojects\fixHtml\fix_fonts>perl sanitycheck.t Perl files that don't use the stricutres ./modules/Htmlripper/Fixbeginningincludes.pm ./modules/Htmlripper/Fixmaintableincludes.pm ./modules/Htmlripper/Fixtidy.pm ./modules/Htmlripper/Fixtocanonical.pm ./modules/Htmlripper/Regex/Changeincludes.pm ./modules/Htmlripper/Regex/Fixdoctype.pm ./modules/Htmlripper/Regex/Fixwhitespace.pm ./modules/Htmlripper/Regex/Striphaupttable.pm ./modules/Htmlripper/Regex/Stripmenu.pm C:\thomasdata\thomasprojects\fixHtml\fix_fonts>