in reply to how to make close() fail
open my $fh, '>', 'foo'; close $fh; close $fh or die $!; __END__ Bad file descriptor at [download]