I think you're wrong there. Postincrement only works different for strings if they start with a letter. For strings like "199" it makes no difference: you just get 200. And other strings apparently are converted to a number first, as $x = "2A"; $x++ produces 3.Bitwise operators are the only place where there's a difference between strings and numbers.No. It matters for post-increment as well.
It's a deliberate decision, and well worth the offset. It allows you to use bitfields that aren't restricted to 32 (or 64) bits.Yes, I don't question the functionality, that is useful. But the typical Perl thing to do would have been to provide different operators for strings and for numbers. Just as with = vs eq and + vs ..
In reply to Re^3: "2" | "8" = ":" and 2|8=10
by bart
in thread "2" | "8" = ":" and 2|8=10
by MSoegtropIMC
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |