in reply to Re: Opening and Closing STDOUT
in thread Opening and Closing STDOUT
++chromatic , certainly localizing *STDOUT fixes the problem, but just to play devils advocate..., IS it possible to close STDOUT and re-open it again to the console?
print "Standard and Out\n"; close STDOUT; open (STDOUT, ">>over.txt") or die "Screaming $!"; print "Over and Out\n"; close STDOUT; open (STDOUT, ">>/dev/pts/0") or die "Can open console $!" #Ok so I ch +eated and used `who` to find this print "Aye Aye Capt'n\n";
Which of course is largely useless and redundant given your solution, plus I have NFI how to programatically determine which /dev to open
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Opening and Closing STDOUT
by hawtin (Prior) on Mar 05, 2003 at 07:37 UTC | |
by submersible_toaster (Chaplain) on Mar 05, 2003 at 23:47 UTC |