in reply to Re^3: problem with sysseek in loop
in thread problem with sysseek in loop
I dont understand, it should /just/ work right? I dont open the file over and over and the md5 check is in the foreach loop.my $dirname = "extracted"; open (my $md5file, '<', "C:/md5"); binmode($md5file); foreach my $file (<$dirname/*>) { next if -d $file; open( my $FILE, $file ); binmode($FILE); $file =~ s{.*/}{}; my $md5hash = Digest::MD5->new->addfile($FILE)->hexdigest; if ($md5hash =~ $md5file){ print "$file MATCH\n"; } else { print "$file NO MATCH!\n"; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: problem with sysseek in loop
by Laurent_R (Canon) on May 08, 2014 at 09:31 UTC | |
by james28909 (Deacon) on May 08, 2014 at 15:43 UTC |