in reply to Re: Why does this even compile?
in thread Why does this even compile?

So the indirect object notation makes a word plus a bare block be treated as a do BLOCK in normal OO notation? Eww. I was going to ask where this was good for, but you just supplied an example.

Oh BTW, you can have the same problem if you mistype "else". If this block is the last thing in an enclosing block, it'll compile.

#! perl -wl use strict; my $x = 1; if($x) { print "yes"; } esle { print "no"; }

Result:

Can't call method "esle" without a package or object reference at test +.pl line 6. yes no