in reply to Converting to boolean

I don't really use "explicit Booleans" in Perl because they aren't needed, but in those rare cases where I want to convert something to 0 or 1 because some other program expects it that way, I use $x = $x ? 1 : 0. It might not be the shortest, cleverest, or most illegible way available, but it's simple, clear, and gets the job done.