http://qs1969.pair.com?node_id=84597


in reply to Re: (Efficiency Golf) Triangular numbers
in thread (Efficiency Golf) Triangular numbers

Well, your "agricultural" regex could be written far much simpler, in a way even that doesn't hardcode the number of digits: ! /(\d).*\1/

I'm a bit surprised to see an idiom in your program that another solution also used:

foreach (@array) { push @other, $_ if some_condition; }

Of course, that's much clearer, and more efficiently, written as:

@other = grep {some_condition} @array;

-- Abigail