in reply to Scratching my head...

change the "||" to or, you should see the error message.

open OUTFILE, ">$outputfn" or die "Error opening output file: $!\n";