in reply to Process output redirecting
close(STDOUT); close(STDERR); open(STDOUT , ">logfile.txt") or die "Can't open logfile: $!\n"; # now anything that is printed will go to the logfile unless # its given another filehandle. Just be sure to close the # handle before the program exits. ... # program end close(STDOUT);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Process output redirecting
by mr.nick (Chaplain) on Apr 23, 2001 at 04:38 UTC | |
by tilly (Archbishop) on Apr 23, 2001 at 06:54 UTC |