Dr.Ruud wrote: > Matt Sergeant schreef: > > >> perl -Mstrict -le 'if (1) { if (open(my $fh, q(/etc/passwd))) { print >> "inner"; } } system(qq(ls -l /proc/$$/fd));' >> >> Shows that the filehandle just isn't closed AT ALL (until program >> exit). >> > > That's another bug. The "if (1) {}" can be optimized away, but should at > least leave a (scoping) block. > > B::Deparse says, that there is a do block: rbaecker@test ~/ $ perl -MO=Deparse if.pl use warnings; use strict 'refs'; do { if (open my $fh, '/etc/passwd') { print 'inner'; } }; system "ls -l /proc/$$/fd"; -- Renée Bäcker renee.baecker@smart-websolutions.de Smart-Websolutions André Windolph und Renée Bäcker GbR Maria-Montessori-Str. 13 64584 Biebesheim USt-ID: DE 228 935 695 Tel: 0177-2416996 XING: http://www.xing.com/profile/Renee_Baecker Foo-Magazin: http://foo-magazin.deThread Previous | Thread Next