Perl-Sensitive Sunglasses | |
PerlMonks |
Re^3: I fear my code is unreadableby BrowserUk (Patriarch) |
on May 06, 2008 at 15:36 UTC ( [id://684985]=note: print w/replies, xml ) | Need Help?? |
Well, you could go with
But in
The line ref eq 'ARRAY' ? @$_ : $_ just says: if it($_) is a value (array) flatten it to a list, (which you already had in your own version), or if it is a key, pass it through untouched. That avoids having to treat the keys and values separately, (and iterate the hash twice to generate them). In doing so it reduces the noise level a little further. Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
In Section
Seekers of Perl Wisdom
|
|