There's more than one way to do things | |
PerlMonks |
Re: Re: (Efficiency Golf) Triangular numbersby Abigail (Deacon) |
on May 31, 2001 at 19:12 UTC ( [id://84597]=note: print w/replies, xml ) | Need Help?? |
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:
Of course, that's much clearer, and more efficiently, written as:
-- Abigail
In Section
Meditations
|
|