Or even better, just use List::AllUtils - https://metacpan.org/pod/List::AllUtils
Reply on news.ycombinator.com