There's more than one way to do things | |
PerlMonks |
Re^2: Slicing a hash reference from a collection of hash references within a hash referenceby muba (Priest) |
on Oct 08, 2015 at 02:27 UTC ( [id://1144131]=note: print w/replies, xml ) | Need Help?? |
It is not "a sign of a newbie" to use more source-code lines. To the contrary, indeed. Just recently, I was hacking together a piece of code that featured a map within a map. Sure, the whole thing fitted on one "line", if your definition of "line" is somewhat liberal:
Which, in reality, looked more like:
But then I was looking at it, and I shook my head. Sure, it worked. But was it "clean" code? Not by a long stretch: I could either slap multiple lines on comments on it, explaining what was going on, or refactor the whole thing:
The final solution definitely took more lines, but it also was way more comprehensible.
In Section
Seekers of Perl Wisdom
|
|