I would check for error on open. open FILE, ">file.txt" or die $!;
cheers
SK
In reply to Re: Getting STDIN and writing to a file by sk in thread Getting STDIN and writing to a file by Anonymous Monk