in reply to Unable to write to file

but unable to print it to the a outputfile
It works for me at my unix prompt. It creates "outputfile.log" with these contents:
aaa,1 bbb,2 ccc,3 SUCCESS aaa : a 3 : 1 bbb
It also prints this output with warnings:
aaa,1 bbb,2 ccc,3 ac 1,a 3,b 2,c Argument "1 bbb" isn't numeric in numeric eq (==) at z line 20, <FHAC> + line 1 (#1) (W numeric) The indicated string was fed as an argument to an oper +ator that expected a numeric value instead. If you're fortunate the me +ssage will identify which operator was so unfortunate. readline() on closed filehandle FHAC at z line 20 (#2) (W closed) The filehandle you're reading from got itself closed so +metime before now. Check your control flow. SUCCESS aaa : a 3 : 1 bbb

Please edit your post using code tags around your code and data. See Writeup Formatting Tips. Also post the output and any warning messages you get.

Update: simplify your code to see if you can write to a file, and use autodie:

use strict; use warnings; use diagnostics; use autodie; open( OUTFH, ">outputfile.log" ); print OUTFH "here is some output\n"; print OUTFH "here is more output\n"; close(OUTFH);