http://www.perlmonks.org?node_id=1008583


in reply to Re: Perl allows you to change the definition of false to make it true. (And vice versa.)
in thread Perl allows you to change the definition of false to make it true. (And vice versa.)

I discovered the trick perusing boolean which uses it to good effect. It makes boolean expressions such as "foo" eq "bar" return boolean objects (which in turn overload boolification). The net effect is to give Perl a boolean type.

perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'