{ open my $fh, '<', $file or die $!; # can use the fh here } # but not here, fh auto-closed in the block