open(my $fh1, '>', $SCAC_output) ; foreach (@output) { print $fh1 "$_ \n "; } close $fh1 ;