in reply to Taken out of Context
I always considered it good practice to stick an explicit plain return in every sub that’s not meant to have an actual return value, in order to avoid random stray bits traveling around unexpectedly. Your meditation just gives me another reason for the practice.
FWIW, I’m not sure why you thought map would be easier than foreach. You have more control over the latter (you can use next and last, whereas with map you have to clumsily produce an empty list in order to skip a value and can’t abort early at all).
PS.: your title gave away the riddle prematurely…
Makeshifts last the longest.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Taken out of Context
by liverpole (Monsignor) on Jul 25, 2006 at 12:26 UTC |