in reply to Re^4: Can you explain the result?
in thread Can you explain the result?

It makes
open my $FH, '<', $filename or die $!;
and is similar to shell's
mkdir $dir || exit 1
But, of course, you can think whatever you want.

Replies are listed 'Best First'.
Re^6: Can you explain the result?
by PerlOnTheWay (Monk) on Dec 06, 2011 at 14:07 UTC

    The real problem is that return is pretty different than ordinary subs like open and etc...

      How so?

        return affects control flow, which a function in general cannot (leaving Coro aside). Execution after a function returns will always resume right after where the function was called.

        The only built-in function that somewhat affects control flow is exit.