<?xml version="1.0" encoding="windows-1252"?>
<node id="633510" title="Re^5: self-feeding infinite loop" created="2007-08-18 14:03:20" updated="2007-08-18 10:03:20">
<type id="11">
note</type>
<author id="345630">
Errto</author>
<data>
<field name="doctext">
It's not "unpredictable" in the sense of being random but it is undefined in the sense that it is not  specified in the documentation and could potentially change in a future release.  Quoting [doc://perlsyn]:
&lt;blockquote&gt;
If any part of LIST is an array, foreach  will get very confused if you add or remove elements within the loop body, for example with splice. So don't do that. 
&lt;/blockquote&gt;
I should add for the record that I once asked the same question [id://428760|myself].</field>
<field name="root_node">
633455</field>
<field name="parent_node">
633486</field>
</data>
</node>
