<?xml version="1.0" encoding="windows-1252"?>
<node id="84597" title="Re: Re: (Efficiency Golf) Triangular numbers" created="2001-05-31 15:12:42" updated="2005-07-19 14:08:39">
<type id="11">
note</type>
<author id="19977">
Abigail</author>
<data>
<field name="doctext">
Well, your "agricultural" regex could be written far
much simpler, in a way even that doesn't hardcode the
number of digits:
&lt;code&gt;! /(\d).*\1/&lt;/code&gt;
&lt;p&gt;
I'm a bit surprised to see an idiom in your program that
another solution also used: 
&lt;code&gt;
    foreach (@array) {
        push @other, $_ if some_condition;
    }
&lt;/code&gt;
&lt;p&gt;
Of course, that's much clearer, and more efficiently, written
as:
&lt;code&gt;
    @other = grep {some_condition} @array;
&lt;/code&gt;

&lt;p&gt;
-- Abigail</field>
<field name="root_node">
84175</field>
<field name="parent_node">
84515</field>
</data>
</node>
