3 ms·
But Perl does have functions with arguments, by all definitions. https://metacpan.org/pod/distribution/perl/pod/perlsub.pod#Signatures https://metacpan.org/pod/
by lazyloop 7y ago
But Perl does have functions with arguments, by all definitions. https://metacpan.org/pod/distribution/perl/pod/perlsub.pod#Signatures https://metacpan.org/pod/distribution/perl/pod/perlsub.pod#S...
- jlokier 7y agoIndeed, Perl does have named function parameters, the same as almost all modern languages - and I highly recommend using them. (I use them throughout my code, except for modules that should stay compatible with very old versions of Perl.) But folklore is a thing. Many people learned Perl before named parameters, and to be fair they took about 20 years to arrive (and are still called "experimental"!). People don't like to change now. I think most people writing new Perl code still use the no-named-arguments idiom, just because it's old and familiar. Which makes code look more arcane than it needs to, to outsiders, unfortunately.