my @output= grep {/\S/} @file_line_contents; print OUTFILE1 "\"$coid\"\,\"".join ('","', @output);