3 ms·
Perl solved that issue by introducing the // and //= operators, which do the same thing as || and ||=, but restricted to consider only undef as false.
by Mithaldu 11y ago
Perl solved that issue by introducing the // and //= operators, which do the same thing as || and ||=, but restricted to consider only undef as false.
- J_Darnley 11y agoYou mean those are not integer divide operators?
- Mithaldu 11y agoNumbers are float by default in Perl. If you want Integer operations you need to cast with int() or use https://metacpan.org/pod/integer https://metacpan.org/pod/integer
- Flimm 11y agoIt's called "defined-or" if you want to search for its documentation. I really miss it in other languages.