<html><body><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000"><div>It could be anything in Perl's mind I guess. :)</div><div><br data-mce-bogus="1"></div><div>[ 1, 2 ] is basically the same as { '1' =&gt; '2' } from our view. &nbsp;Net::LDAP developers may have just decided to stick with array references so that they did not have to deal with hash vs array. &nbsp;You could just cast it to either.</div><div><br data-mce-bogus="1"></div><div>I thought that maybe using the array and casting to hash would preserve ordering, but the order is still random.</div><div><br data-mce-bogus="1"></div><div>my $hash = {<br> '1' =&gt; 'One',<br> '2' =&gt; 'Two'<br> };<br><br>print "Hash:\n";<br>foreach my $ref (keys %{$hash}) {<br> print "$ref\n";<br>}<br><br><br>my $array = [ '1' =&gt; 'One', '2' =&gt; 'Two' ];<br><br>print "Array:\n";<br>foreach my $ref (@{$array}) {<br> print "$ref\n";<br>}<br><br>my %hasher = @{$array};<br><br>print "Array:\n";<br>foreach (keys %hasher) {<br> print "$ref\n";<br>}<br></div><div><br></div><div><br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div><br></div><hr id="zwchr" data-marker="__DIVIDER__"><div data-marker="__HEADERS__"><blockquote style="border-left: 2px solid #1010FF; margin-left: 5px; padding-left: 5px; color: #000; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;" data-mce-style="border-left: 2px solid #1010FF; margin-left: 5px; padding-left: 5px; color: #000; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;"><b>From: </b>"Todor Fassl" &lt;fassl.tod@gmail.com&gt;<br><b>To: </b>"Chris Fowler" &lt;cfowler@outpostsentinel.com&gt;, "Atlanta Linux Enthusiasts" &lt;ale@ale.org&gt;<br><b>Sent: </b>Tuesday, May 24, 2016 5:21:05 PM<br><b>Subject: </b>Re: [ale] perl bogosity<br></blockquote></div><div data-marker="__QUOTED_TEXT__"><blockquote style="border-left: 2px solid #1010FF; margin-left: 5px; padding-left: 5px; color: #000; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;" data-mce-style="border-left: 2px solid #1010FF; margin-left: 5px; padding-left: 5px; color: #000; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;">Are you sure about that?<br><br>$ perl -e 'print ref({ "key" =&gt; "value" }) . "\n";'<br>HASH<br>$ perl -e 'print ref([ "key" =&gt; "value" ]) . "\n";'<br>ARRAY<br><br>Using the Data::Dumper module, it looks like [ 'key' =&gt; 'value' ] <br>creates an anonymous reference to an array with 2 elements.<br><br>On 05/24/2016 03:10 PM, Chris Fowler wrote:<br>&nbsp;&gt; [ 'key' =&gt; 'value' ] is an associative array like that.<br>&nbsp;&gt;<br><br>-- <br>Todd<br></blockquote></div></div></body></html>