Closed p5pRT closed 18 years ago
The example program below generates no errors or warnings and outputs "extra everything". (Yes\, this bug is a whopper.)
#! /usr/local/bin/perl use strict; use warnings; open(my $fh\,">"\,\undef) or die "open: $!"; print {$fh} "extra everything\n" or die "print: $!"; close($fh) or die "close: $!"; print undef;
Bo Lindbergh (via RT) \perlbug\-followup@​perl\.org wrote
The example program below generates no errors or warnings and outputs "extra everything". (Yes\, this bug is a whopper.)
And anyone fixing this should deal with these variations:
perl -wl open(my $fh\,">"\,\(!0)) or die "open: $!"; print {$fh} "extra everything\n" or die "print: $!"; close($fh) or die "close: $!"; print !0; print !!0 __END__ extra everything
perl -wl my $x = \3.14; open(my $fh\,">"\,$x) or die "open: $!"; print {$fh} "extra everything\n" or die "print: $!"; close($fh) or die "close: $!"; print $$x; __END__ extra everything
Mike Guy
The RT System itself - Status changed from 'new' to 'open'
On 02/09/06\, via RT Bo Lindbergh \perlbug\-followup@​perl\.org wrote:
The example program below generates no errors or warnings and outputs "extra everything". (Yes\, this bug is a whopper.)
#! /usr/local/bin/perl use strict; use warnings; open(my $fh\,">"\,\undef) or die "open: $!"; print {$fh} "extra everything\n" or die "print: $!"; close($fh) or die "close: $!"; print undef;
Thanks for the report; I've fixed that in bleadperl by change #28798.
@rgs - Status changed from 'open' to 'resolved'
Migrated from rt.perl.org#40267 (status was 'resolved')
Searchable as RT40267$