3 ms·
Perl doesn't have boolean types and you have to end class definitions with 1; Most languages are better than Perl.
by stevebmark 11y ago
Perl doesn't have boolean types and you have to end class definitions with 1; Most languages are better than Perl.
- m0skit0 11y agoI disagree. Not for quick scripts.
- mercurial 11y agoModules, not classes. Also, while Python has True and False, 0 is falsy and all other numbers are truthy. There are a lot of problems with Perl, but picking on these two is a bit silly. They belong to the class of superficial issues that all languages suffer from.
- cms07 11y agoPerl is a terrific language. When's the last time you've used it?
- eCa 11y agoBut what is true in Perl is well-defined: http://perldoc.perl.org/perlsyn.html#Truth-and-Falsehood http://perldoc.perl.org/perlsyn.html#Truth-and-Falsehood And modules doesn't have to end with 1;. They must return a true value :) Added: If one really want booleans, there is [1]. [1] https://metacpan.org/pod/boolean https://metacpan.org/pod/boolean