in reply to Counter Intuitive Code

What you get is the string-biwise-or, not the number-bitwise-or:

perl -wle "print '16'|'8'" 96 perl -wle "print '1'|'8'" 9

If you tell Perl that you want the things to be really treated as numbers, the bitwise-or operator acts on the numerical representations:

perl -wle "print 0+'16'|0+'8'" 24

Prefixing 0+ in front of an expression is the canonical way in Perl to make a value be treated more as a number.