Re:In Praise of Perl 5
by reality_czech on Monday March 03, 2014 @06:02AM
(#7333089)
Flattening an array is trivial in Ruby:
[[1, 2, 3], 4, 5].flatten()
I don't see how it could possibly be made easier or more intuitive than a single function call. Ruby also makes it clear what is going on.
Perl references combined with its nested list semantics make it extremely convenient to flatten arrays and hashes when you need to. Doing the equivalent in Python and Ruby is verbose and ugly by comparison. I know in Ruby you can get it down to one line, but it lacks the cleanliness of Perl (if you can believe that).