in reply to how to alternate join?
That reads pretty nice. I'm going to say that's my final answer, Regis.sub pairs { map {join ',', splice(@_, 0, 2)} 0..$#_/2 } print join("\n", pairs(@arr)), "\n";
Update: replaced an awkward map with a nice splice.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: how to alternate join?
by SamCG (Hermit) on May 05, 2005 at 18:24 UTC |