in reply to Re^2: howto map/grep a complex structure
in thread howto map/grep a complex structure
Sorry Guvna, did not know you are in charge of what is legacy / old fashioned. Please consider that I tried to make it look cool, clear, & concise when you call it without parenthesis outside the sub. It also adds some compile time checking against calling it in the wrong context.
I'd have a look at the code and remove the &, but then prototypes may break. If I break it, it won't work.
Prototypes are a very uncommon thing, and unless you've dealt with them How do you become proficient if you never use them a first time?
I'm passing in a list of two items, but $x is the last element of the list and $y is completely borked. Can't pass in a list without intentionally circumventing the prototype.
It could be re-written but then all the new perl programmers would be calling it in list context on accident and breaking everything.. those clumsy new guys. Here is another argument about maintainability Finding repeat sequences..
|
|---|