in reply to Re: How do I use a block as an ‘or’ clause instead of a simple die?
in thread How do I use a block as an ‘or’ clause instead of a simple die?

The limit of if is encountered if you declare a variable.
if (!open(my $fh, '<', $qfn)) { ... } print $fh $s; # XXX
if (my ($y) = f($x)) { # Returns () on error. ... } print defined($y) ? $y : '[undef]'; # XXX

Solutions: