in reply to Re^4: list reversal closure
in thread list reversal closure
Apples and oranges. We were talking about print for reverse vs print reverse. for clearly compromises it:
$, = ", "; $\ = "\n"; @array = map{ [ 'a'..'f' ] } 1 .. 6;; for (@array) { print for reverse @$_; } __END__ f e d c b a f e d c b a f e d c b a f e d c b a f e d c b a f e d c b a
$, = ", "; $\ = "\n"; @array = map{ [ 'a'..'f' ] } 1 .. 6;; for (@array) { print reverse @$_; } __END__ f, e, d, c, b, a f, e, d, c, b, a f, e, d, c, b, a f, e, d, c, b, a f, e, d, c, b, a f, e, d, c, b, a
Updated to use parent's @array.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: list reversal closure
by BrowserUk (Patriarch) on Aug 21, 2006 at 16:31 UTC | |
by ikegami (Patriarch) on Aug 21, 2006 at 16:33 UTC | |
by BrowserUk (Patriarch) on Aug 21, 2006 at 17:26 UTC | |
by ikegami (Patriarch) on Aug 21, 2006 at 17:44 UTC | |
by apotheon (Deacon) on Aug 21, 2006 at 19:32 UTC |