<pp>I received a fix to my problem here http://stackoverflow.com/questions/11245797/perl-large-io-bug-on-mac-but-not-windows-or-linux-adds-newline-cant-be-chomped/11246092#11246092
The problem was possibly that formatting the $tempFile in windows caused a hiddencharacter to be added to the newlines that was not removed by chomp on a mac.
Comment on Re: Breaks on Mac but not Windows or Linux - huge IO