#!/usr/bin/perl -w use strict; my $choice = 'computerAttributes'; my %computerAttributes = ( cn => 'Common Name (eg. John Doe)', distinguishedName => 'Computer distinguishedname (dn) representing object location in LDAP-directory', lastLogOff => 'Last time LDAP-directory received logoff message from system' ); my %userAttributes = ( cn => 'Common Name (eg. laptop1)', sn => 'Surename', displayName => 'First and lastname', title => '' ); foreach (my $key = keys %($choice)) { print "$key\n"; }