Re:Which Programming Languages Are Functional?
by Mithaldu on Wednesday December 30, 2015 @10:31AM
(#10812411)
They're all documented and explained in https://metacpan.org/pod/distribution/perl/pod/perlvar.pod and all have english names available and all but a small hand-full only exist for backwards compatibility at this point.
[ Parent
| on HN ]
Re:Which Programming Languages Are Functional?
by typon on Wednesday December 30, 2015 @10:34AM
(#10812423)
I would never use them in my code. The problem is when I'm debugging 5 year old code it becomes such a headache.
Re:Which Programming Languages Are Functional?
by arethuza on Wednesday December 30, 2015 @10:41AM
(#10812450)
I thought that the point of $_ was that you don't reference it directly in your code?
Re:Which Programming Languages Are Functional?
by Mithaldu on Wednesday December 30, 2015 @10:44AM
(#10812472)
It is!
But sometimes you end up using it to make code more reliable, as in:
do_thing($_) for @things;
Where $_ is passed in as an argument, as opposed to: do_thing for @things;
Where $_ is (due to its global nature) set by `for`, and read in sub do_thing { ... }
Re:Which Programming Languages Are Functional?
by Mithaldu on Wednesday December 30, 2015 @10:42AM
(#10812456)
> I would never use them in my code.
Most people don't. The only one that is used a lot is @_. :)
As for debugging old code, that's why i pointed out perlvar. It's never far and it's always easy to look up what a specific var does.