I beg to differ, but I find that neither beautiful nor readable. At the expense of sounding like an old fart, I would privilege readability over beauty, which is, of course, in the eye of the beholder anyway.
Especially for code you write for clients, I would shun dropping braces of maps (the speed optimisation is negligable) and implicit uses of $_. Spell it out:
return map {split( ' ', uc($_), 2)} @somearray;This makes it pretty obvious that some sort of transform is being applied to @somearray, and that is what is being returned.
I used to omit return until the day I tried to return an anonymous hash reference...
• another intruder with the mooring in the heart of the Perl
In reply to Re: Should I leave behind beautiful code or readable code?
by grinder
in thread Should I leave behind beautiful code or readable code?
by MaxKlokan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |