in reply to map vs foreach
in thread Using s///e and it just doesn't feel right
This first call to bob uses a map in void context whereas the second call does not. The point was to imply the question of whether I should use two different subs to perform the same task having only the difference that one returns a list and the other returns nothing.
bunnyman: [In response to: And why then is map allowed to be called in void context?] There are a lot of things you can do with Perl that you shouldn't do.
Following that logic, I should create two subs. Perl takes the stance of TIMTOWTDI. Why not let the programmer determine what should be used instead of laying down a draconian policy?
dash2, this isn't directed towards you (considering we are basically on the same platform with this one). I'm just saying what I thought was obviously implied by the code.
antirice
The first rule of Perl club is - use Perl
The ith rule of Perl club is - follow rule i - 1 for i > 1
|
|---|