View Single Post
  #5   (View Single Post)  
Old 18th November 2008
ephemera's Avatar
ephemera ephemera is offline
Knuth's homeboy
 
Join Date: Apr 2008
Posts: 537
Default

Quote:
Originally Posted by stukov View Post
Code:
my $attributes = ['objectClass'     => ['top', 'posixAccount', 'shadowAccount', 'inetOrgPerson'],
                  'loginShell'      => "/bin/bash"];
$attributes is an array reference.

the => operator is effectively a comma operator where the left hand object is taken as a double quoted string. in the given code its probably used to make the association clear (like J65nko said).

i am not sure why they haven't used a hash reference. possibly for a small performance gain?

Last edited by ephemera; 18th November 2008 at 07:12 PM.
Reply With Quote