in reply to Getting STDIN and writing to a file

This works just fine on my system (XP Home), same perl.
I'd rather change
print FILE "$record\n";
to
print FILE "$record";
unless that is on purpose, as $record will normally be terminated with a newline.

Cheers,
PerlingTheUK