slojuggler2 has asked for the wisdom of the Perl Monks concerning the following question:
If I then immediately do:#!/usr/bin/perl -w $log_file = "/home/privera/perl/logfile"; open(STDOUT, "| tee $log_file"); print "Testing 1.2.3...\n"; close(STDOUT); <lines to try below...>
oropen(STDOUT, ">&SAVEOUT"); print STDOUT "I'm done\n"; close(STDOUT);
I get:open(STDOUT); print "I'm done\n"; close(STDOUT);
What am I doing wrong? Thanks. --slojuggler2...print on closed filehandle main::STDOUT at write2.pl line 7.
Originally posted as a Categorized Question.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How do I restore STDOUT
by VSarkiss (Monsignor) on Jul 05, 2001 at 23:36 UTC | |
|
Re: How do I restore STDOUT
by slojuggler2 (Initiate) on Jul 06, 2001 at 20:21 UTC | |
by Anonymous Monk on Jul 07, 2001 at 00:40 UTC | |
|
Re: How do I restore STDOUT
by ariels (Curate) on Jul 08, 2001 at 00:39 UTC | |
|
Re: How do I restore STDOUT
by BrentDax (Hermit) on Jul 06, 2001 at 08:00 UTC | |
|
Re: How do I restore STDOUT
by Anonymous Monk on Jul 06, 2001 at 01:26 UTC |