open FILE, ">$file"; select FILE; # print will use FILE instead of STDOUT print "Hello, world!"; # goes to FILE select STDOUT; # back to normal print "Goodbye."; # goes to STDOUT
In reply to Re: how do i redirect STDOUT, STDIN, or STDERR to a FILE?
by pwesthagen
in thread how do i redirect STDOUT, STDIN, or STDERR to a FILE?
by Buckaroo Buddha
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |