... { ... if (my $obj = ...) { ... } . . # $obj still exists here "anonymously". . } # $obj cleared here, so destructor only called here. ...