open CMD, "@array > $outfile" or die "open() failed - $!";