4 ms·
> Perl evolved from being a better AWK awk has named parameters! Perl was a step backwards!
by twic 5y ago
> Perl evolved from being a better AWK
awk has named parameters! Perl was a step backwards!
- deleted 5y ago[deleted]
- ecef9-8c0f-4374 5y agoWell it's your lucky day. Named parameters are perl since 5.20 ... as an "experimental" feature ... Now you can write. use v5.20; use feature 'signatures'; sub print_text( $param1 , $language = "perl", $years = 10 ) { say "I would have loved this $language $param1 more then $years years ago"; } print_text "feature"
- bmn__ 5y agoThis already was available more than ten years ago, you simply had to install a module.
- ecef9-8c0f-4374 5y agoI used to use perl5i for scripting, which had func(). Point is. As soon as I tell someone "you have to use tarball/cpan/cpanplus/cpanminus to install the feature "named parameters" they leave. But now it's here
- matthewpersico 5y agoAnd I believe that with the next release, a simple use v5.36; will enable the feature.