3 ms·
>This isn't really any different than JavaScript or similar languages that perform automatic type coercion. "1" + "1" is "11" in JavaScript. In Perl, it's 2. T
by eurleif 5y ago
>This isn't really any different than JavaScript or similar languages that perform automatic type coercion.
"1" + "1" is "11" in JavaScript. In Perl, it's 2. There's also no JS-like `typeof` operator in Perl. The types you mention in Perl XS are just an implementation detail from the perspective of the language itself. "1" and 1 are exactly the same value, not different values that can be coerced into each other.