Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I've been reading a book on DBMS administration using perl (specific book doesn't matter) and have seen this in other perl books as well. (I'm not singling out any author) Several books tend to avoid the use of map and grep. I can only assume that the authors have trouble explaining the usage and benefits of these in such a way that perl programmers can understand. How can we explain map and grep better? One of the benefits is that often, using map or grep provides increased performance (see example below). Another is that you can chain the greps and maps together to make your life so much easier. I'm convinced that map & grep aren't as heavily used as they could be because people don't understand them. Example:
Benchmark:
Jason L. Froebe No one has seen what you have seen, and until that happens, we're all going to think that you're nuts. - Jack O'Neil, Stargate SG-1 In reply to question for perl book & magazine authors by jfroebe
|
|