Skip to content

Comment on Perlsecret – Perl secret operators and constantsparent

Comments

Fair, I forgot that C bools are just 0 and 1. That's where I first learned the !! trick, but it's been many a year.

Err, C bools have two interpreted values, TRUE, and FALSE.

Confusingly (to some) they are integers and while 0 represents FALSE, any non 0 value represents TRUE.

It's pedantic, apologies, but that is why the GP refers to "convert to strict boolean"

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.