open FINDER, "find . -type f -print |" || die "Couldn't issue find command\n"; my %SGML_Reporting_Stuff; while () { my $fh = IO::File->new($_) || die "Cannot open '$_' for reading\n"; # Do stuff to populate %SGML_Reporting_Stuff $fh->close; } close FINDER; # Use %SGML_Reporting_Stuff here.