in reply to two statements in or

Well, you could use do:

open my $fh, 'file' or do { something; something else; };

But that's getting a bit obscure, so I'd probably write something a bit more expressive.

if (!open my $fh, 'file') { something; something else; }

Or

unless (open my $fh, 'file') { something; something else; }
--

See the Copyright notice on my home node.

Perl training courses