<?xml version="1.0" encoding="windows-1252"?>
<node id="880122" title="Re: simple array question" created="2011-01-02 22:22:50" updated="2011-01-02 22:22:50">
<type id="11">
note</type>
<author id="664508">
philipbailey</author>
<data>
<field name="doctext">
&lt;p&gt;It seems that you are trying to assign a list to array @compass.  Lists are surrounded by brackets, or parentheses if you prefer that term: ().  Instead, you have used braces, which in this case create a reference to an anonymous hash, hence the warning messages.&lt;/p&gt;

&lt;p&gt;So you need something more like this:&lt;/p&gt;
&lt;code&gt;
#!/usr/bin/perl

use strict;
use warnings;

my @compass = (
    ["NW", "N", "NE"],
    ["W", "center", "E"],
    ["SW", "S", "SE"],
);

print $compass[0]-&gt;[1];
&lt;/code&gt;

</field>
<field name="root_node">
880118</field>
<field name="parent_node">
880118</field>
</data>
</node>
