<?xml version="1.0" encoding="windows-1252"?>
<node id="557899" title="Re: List::MoreUtils and require" created="2006-06-27 19:41:10" updated="2006-06-27 15:41:10">
<type id="11">
note</type>
<author id="491819">
ioannis</author>
<data>
<field name="doctext">
The &lt;b&gt;require&lt;/b&gt; loads the module at runtime, yet you
were trying to reference one of its functions before INIT.
Here is one solution:
&lt;code&gt;
use warnings;

my @v1 = qw(4 0 0 3);
my @v2 = qw(4 0 0 3);

INIT {
        require List::MoreUtils;
        my $ea = List::MoreUtils::each_array(@v1, @v2);
        while (my ($v, $t) = $ea-&gt;())
        {
        }
}
&lt;/code&gt;</field>
<field name="root_node">
557894</field>
<field name="parent_node">
557894</field>
</data>
</node>
