in reply to Re^2: why does Perl eval have a strange terminator?
in thread why does Perl eval have a strange terminator?

I think I'm beginning to understand where you're coming from.

Try/Catch in other languages is a compound statement, and the new Perl feature is also implemented as such.

But

isn't, it's function like.

I think that's at least partly due to sharing its name with

in Perl.

Actually it's quite surprising for many coming from other languages, that we call it "eval".

Larry often loved to "recycle" concepts.

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery

Replies are listed 'Best First'.
Re^4: why does Perl eval have a strange terminator?
by ikegami (Patriarch) on Jun 27, 2022 at 13:29 UTC

    I think that's at least partly due to sharing its name with eval "string";

    It's due to it returning a value. That makes it an expression.