open(DATA, ">$filename") or die "Aargh: $!"; binmode DATA; ...