If you intended to slurp the whole file by
$file = <INF>;, I think you are mistaken. At least this is what a short test on my computer gave me.
binmode appearently does not set
$/ (and actually I never expected it to). Try
$file = do { local $/; <INF> }; instead. Maybe it works, but there might be other bugs as well. Good luck on your hunt!
Hope this helped.
CombatSquirrel.
Entropy is the tendency of everything going to hell.