Listing 4: Retrieving and sorting address protocols # Cycle through each protocol and display addresses foreach my $Protocol ( sort{ lc $a cmp lc $b} ( keys( %ProxyAddressList ) ) ) { my $iCount = 0; print "\t\t\U$Protocol\E Addresses\n"; foreach my $Email ( sort( {lc $a cmp lc $b } @{$ProxyAddressList{$Protocol}} ) ) { printf( "\t\t % 3d) %s\n", ++$iCount, $Email ); } print "\n"; }