in reply to can you assign file handles?
if ("true" eq $flag) { open (OUT, ">output.txt") or die ("could not open output.txt: $!") +; } else { open (OUT, ">&STDOUT"); }
Update:Changed as per bbfu's comment below, although I kept the duplication because IMHO it makes it easier for a newbie to follow.
*~-}hotyopa{-~*
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: can you assign file handles?
by bbfu (Curate) on Jan 30, 2001 at 07:23 UTC |