for my $k (sort(keys(%{$namespace->AddressLists->Item("Global Address List")->AddressEntries("Lastname,Firstname")->GetExchangeUser}))) { printf "$k = %s\n", $namespace->AddressLists->Item("Global Address List")->AddressEntries("Lastname,Firstname")->GetExchangeUser->$k; }