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


in reply to Re: True or False? A Quick Reference Guide
in thread True or False? A Quick Reference Guide

Interesting. I wasn't aware of "0 but true" being special cased. But you did realize that strings matching /^0E\d+$/ have this property too right?

D:\>perl -lwe "my @b=(0,1); for (qw(0E0 1E0)) { print; print qq(Bool:) +,$b[!!$_]; print qq(0+:),0+$_; print $/; }" 0E0 Bool:1 0+:0 1E0 Bool:1 0+:1
---
$world=~s/war/peace/g