BillSeurer has asked for the wisdom of the Perl Monks concerning the following question:
my $fooFile = "foo.out"; unlink $fooFile; #close STDOUT; # with this it works open STDOUT, ">>:encoding(cp37)", $fooFile or die "Cannot redirect STD +OUT\n"; select(STDOUT); $| = 1; print "yadda yadda\n"; close STDOUT;
Is this working as expected or should it work without the close() in there?
I had the person who found this add close()s so it's no big deal but I am just curious as to what is correct.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Redirection and encoding, broken or WAD?
by robin (Chaplain) on Jan 05, 2006 at 21:01 UTC | |
|
Re: Redirection and encoding, broken or WAD?
by ptum (Priest) on Jan 05, 2006 at 19:33 UTC | |
by BillSeurer (Sexton) on Jan 05, 2006 at 20:52 UTC | |
|
Re: Redirection and encoding, broken or WAD?
by DungeonKeeper (Novice) on Jan 06, 2006 at 15:07 UTC |