in reply to question for perl book & magazine authors
Are you asking why they aren't more widely used? Probably because they aren't as widely understood and often result in code that's harder to read. (Your code has to resort to $_ for example, instead of a more informative variable name.) They definitely have their uses and I use them in my code when they seem to provide a benefit over other loop constructs, but a bunch of chained maps and greps is probably not the first tool to reach for if you're concerned about the legibility of your code.
|