in reply to Re^2: and multiple statements
in thread and multiple statements

It's quite common because it's required in the case of open(my $fh, ...), not because it's clearer.

Replies are listed 'Best First'.
Re^4: and multiple statements
by JavaFan (Canon) on Jun 06, 2010 at 21:12 UTC
    Required? I don't follow.
    if (!open my $fh, "<", "filename") { warn "Whatever"; return; }
    is perfectly valid code. There's no requirement that that is to be written as
    open my $fh, "<", "filename" or do {warn "Whatever"; return;};
      Perfectly valid code, but perfectly useless because you can't use the file handle you just opened. You'd have to move the rest of the code into the else body.