New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Layers not applied to reopened STDOUT #8998
Comments
From @clintongormleyCreated by @clintongormleyThis is a bug report for perl from clint@traveljury.com, ----------------------------------------------------------------- According to perlfunc, if you try to re-open STDOUT or STDERR as an "in However, if you don't close it first, then the ':utf8' layer won't be #!/usr/bin/perl my $utf8="\xe9"; open STDOUT, ">>:utf8", 'test.txt' or die $!; close STDOUT; PRINTS: Perl Info
|
From @jkeenanOn Thu, 16 Aug 2007 13:15:15 GMT, DrTech wrote:
I'm confused by this report. You cite pod/perlfunc.pod with respect to opening in-memory files. The relevant documentation in perl-5.24.0 is this: ##### open(my $fh, ">", \$variable) || .. To (re)open C<STDOUT> or C<STDERR> as an in-memory file, close it first: close STDOUT; So far, so good. The example you provide, however, entails opening handles to regular files, not in-memory files. If I rewrite your the first part of your example to print to a scalar reference (attached: print_to_scalar_no_close_first.pl), then I get an exception. ##### If I close the filehandle first (attached as print_to_scalar_close_first.pl), I get reasonable results. ##### So I'm not sure if there is really a bug here. Thank you very much. -- |
The RT System itself - Status changed from 'new' to 'open' |
Migrated from rt.perl.org#44703 (status was 'open')
Searchable as RT44703$
The text was updated successfully, but these errors were encountered: