in reply to Re^3: Better Way of Manipulating Array Elements
in thread Better Way of Manipulating Array Elements
You are missing that he want's a blanks after the commas.
That's not what he said ("join all the elements by a comma"), and that's not what he's currently doing (print join ",", @z;). Trivial change either way.
I improve (golfwise) to [...] unless eof
Good, but
if !eof is even shorter (6 from 10) and clearer.
if !eof() means something different and might be desirable.
But since capturing a literal regex is silly
I doubt the OP is really matching "d".
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Better Way of Manipulating Array Elements
by morgon (Priest) on May 20, 2009 at 00:19 UTC |