View Single Post
  #1   (View Single Post)  
Old 18th November 2008
stukov's Avatar
stukov stukov is offline
Real Name: Jean-Michel Philippon-Nadeau
Package Pilot
 
Join Date: May 2008
Location: Sherbrooke, Qc, Canada
Posts: 167
Default Basic Perl arrays question

Hello,

What does this code snippet do?

Code:
my $attributes = ['objectClass'     => ['top', 'posixAccount', 'shadowAccount', 'inetOrgPerson'],
                  'loginShell'      => "/bin/bash"];
In my understanding, $attributes is a reference to an array. I though Perl arrays could not have indexes? What will the => do then?


Thanks!
__________________
"Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction."
Reply With Quote