system("$doscommand > $logfile"); #### open(LOG, ">$logfile") or die "$logfile: $!"; print LOG `$doscommand`; close LOG;