Perl Monk, Perl Meditation | |
PerlMonks |
Re^3: Terse Code for Odd Numbersby jpeg (Chaplain) |
on May 13, 2005 at 20:43 UTC ( [id://456893]=note: print w/replies, xml ) | Need Help?? |
Was said test asking for the shortest possible answer or simply testing your coding ability? Not to be pedantic, they aren't the same. Those of us who have to communicate with other programmers, write or maintain code, or teach, may disagree with your concept of 'better answer'.
I'd prefer a three line solution above that used a foreach simply for readability.
-- jpg
In Section
Seekers of Perl Wisdom
|
|