#!C:/Perl/bin -w use File::Listing qw(parse_dir); my $dir='c:/mydir/'; #open the directory and get filenames; opendir(TEMP, $dir) || die("Cannot open directory"); @thefiles= readdir(TEMP); closedir(TEMP); $maxsize=0; #cycle through each of the files; foreach $file (@thefiles) { unless ( ($file eq ".") || ($file eq "..") ) { $filesize = -s $dir.$file; if ($filesize > $maxsize){$maxsize=$filesize} print "$file - $maxsize - $filesize\n"; my $html=''; $slurpfile=$dir.$file; open( my $fh, $slurpfile ) or die "couldn't open\n"; my $html = do { local( $/ ) ; <$fh> } ; undef $html; } }