in reply to problem with while loop
use File::Compare; if (compare("file1","file2") == 0) { print "They're equal\n"; } [download]