# send output to file @args2 = ("$tabfile"); open (LOGFILE, ">$logfile") || die "could not open log\n"; unless (system(@args2) == 0) { print STDERR "system(@args2) failed: $? $!\n"; return; } select(LOGFILE); close(LOGFILE);