Damian Conway wrote: > Austin Hastings wrote: > >> All of these have the same solution: >> >> @list = ... >> for [undef, @list[0...]] ¥ @list ¥ [EMAIL PROTECTED], undef] -> $last, $curr, >> $next { >> ... >> } >> >> Which is all but illegible. > > > Oh, no! You mean I might have to write a...subroutine!?? >
Austin Hastings wrote: >>1. Requirement to repeat the possibly complex expression for the list. >>2. Possible high cost of generating the list. >>3. Possible unique nature of the list. >> The subroutine addresses #1, but not 2 or 3. Also, there's a #4: modified state, which is hinted at but not really covered by #3. =Austin