in reply to When is an ^$ not a ^$ ?

If the existence of the \r in the Windows files is the only thing buggering the works up then simply removing the \r should do the trick.
$slurp =~ s/\r//g;
or (from chromatic):
$slurp =~ tr/\r//d;
Do this right after you "slurp" the contents in. Then all should run the same for Linux flavors and Windows flavored files. Claude