use warnings; use strict; use utf8; local $/ = undef; open FILE1, "myfile" or die "Couldn't open file: $!"; binmode FILE1; $string1 = ; close FILE1; open FILE2, "myfile" or die "Couldn't open file: $!"; binmode FILE2; $string2 = ; close FILE2; #and I got stuck here. I am thinking using "for" syntax, couldn't find details. but can anybody help me?