Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Insensitive Scoundrel

by thraxil (Prior)
on Sep 26, 2002 at 17:01 UTC ( [id://200958]=note: print w/replies, xml ) Need Help??


in reply to Insensitive Scoundrel

the FAQ states a good technical reason for avoiding map/grep in a void context. however, i think the most important reason is just that almost any time you'd want to use map or grep in a void context, what you really want is just a foreach loop or something.

map and grep have long histories as list filters that take a list in and spit a list out. using them in a void context reduces them to mere looping constructs. if you need a looping construct, foreach is almost always more appropriate. using map or grep just makes the code more confusing for no good reason.

anders pearson

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://200958]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2024-04-25 09:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found