#!/usr/bin/perl    
use strict;    
use warnings;


my %hash;
my $numetu;
my $nom;
my $prenom;
my $email;

while (<>) {
    chomp;
    if ($_ =~ /^([^:]*):([^:]*):([^:]*):/)
    {
        $nom = $2;
        $nom =~ tr/A-Z/a-z/;

        $prenom = $3;
        $prenom =~ tr/A-Zéèê/a-ze/;

        $email = "$prenom".".$nom"."\@u-bordeaux.fr";
        $hash{$1} = $email;
    }

}

# affichage des paires clé=>valeur
while ( my ($cle,$val)=each(%hash) ) {
    print "cle: $cle, valeur: $val\n";
}


