KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
In Perl, if you have a loop like this: foreach (@items) { perform_action($_); } you can replace it with a call to map in void context: map { perform_action($_) } @items; Are there any advantages or disadvantages to doing to? Does it have a performance impact because Perl thinks it has to save the results? Does it improve/worsen readability?
Tags (comma-separated)
Save Edits
Cancel