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
STDIN <> and PerlIO doc #11788
Comments
From @GreenfactoryCreated by @Greenfactory#!/usr/bin/perl my $data = "aaa\nbbb\nccc\n"; # Ok # Bug Perl Info
|
From @cpansproutOn Thu Dec 08 03:25:08 2011, evdokimov.denis@gmail.com wrote:
By closing STDIN you are closing fd 0, which is reused by the next file I seem to remember this came up about three years ago and the consensus If my memory serves me correctly, searching for ‘you passed sub -- Father Chrysostomos |
The RT System itself - Status changed from 'new' to 'open' |
From @moonlibsThe problem is not in closing fd 0 Let's look at the following sample: # dup.pl ######## (During this I've investigated, that if we do echo -ne "1\n2\n" | perl Then we add the same open my $fh, '<&=',0 or die; to the beginning of the example and check the fileno at the end 0 == fileno $fh or die "fileno fh nonzero"; then we will see, that fileno 0 was kept, it still assigned to stdin (this On Thu, Dec 8, 2011 at 9:18 PM, Father Chrysostomos via RT <
-- |
From mons@rambler-co.ruThe problem is not in closing fd 0 Let's look at the following sample: # dup.pl ######## (During this I've investigated, that if we do echo -ne "1\n2\n" | perl dup.pl, then <$fh> receive nothing. I think that's because of buffered read. Don't know should be this considered a bug) Then we add the same open my $fh, '<&=',0 or die; to the beginning of the example and check the fileno at the end 0 == fileno $fh or die "fileno fh nonzero"; then we will see, that fileno 0 was kept, it still assigned to stdin (this could be checked additionally), but the behavior of this program still the same: we got an output of PerlIO.pm On 08.12.2011, at 21:18, Father Chrysostomos via RT wrote:
|
Migrated from rt.perl.org#105658 (status was 'open')
Searchable as RT105658$
The text was updated successfully, but these errors were encountered: