print system(qq($doscommand > "$logfile")); #### #replace . w/ . if 5.6++ open(LOG, '>>'. $logfile); print LOG qx($doscommand);