Différences
Ci-dessous, les différences entre deux révisions de la page.
Prochaine révision | Révision précédente Prochaine révision Les deux révisions suivantes | ||
tuto:ipasserelle:telephonie:generer_contacts_polycom [19/07/2012 16:58] dani créée |
tuto:ipasserelle:telephonie:generer_contacts_polycom [24/07/2012 15:24] dani |
||
---|---|---|---|
Ligne 14: | Ligne 14: | ||
use Encode; | use Encode; | ||
- | my $a = esmith:: | + | my $acc = esmith:: |
my $pos = 5; | my $pos = 5; | ||
Ligne 24: | Ligne 24: | ||
'; | '; | ||
- | foreach my $u ($a-> | + | my %ext; |
+ | my %ln; | ||
+ | my %fn; | ||
+ | |||
+ | # Get user info (name, phone number) from the account DB | ||
+ | foreach my $u ($acc-> | ||
my $login = $u->key; | my $login = $u->key; | ||
- | next unless ($a-> | + | next unless ($acc-> |
my $pass = $u-> | my $pass = $u-> | ||
- | next unless $pass eq ' | + | next unless |
- | | + | $ext{$login} |
- | next unless ($ext =~ m/ | + | next unless ($ext{$login} |
- | | + | $ln{$login} |
- | | + | $fn{$login} |
+ | } | ||
+ | |||
+ | # Sort by lastname | ||
+ | foreach (sort { lc($ln{$a}) cmp lc($ln{$b}) } keys %ln){ | ||
print " | print " | ||
- | < | + | < |
- | < | + | < |
- | < | + | < |
- | < | + | < |
< | < | ||
< | < |