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

my %genes = (AD4 => "Alzheimer’s disease",
	  BRCA1 => "Breast Cancer",
	  DMD  => "Duchenne Muscular Dystrophy",
         FMR1 => "Fragile X Syndrome",
         GBA => "Gaucher’s Disease");

print "Saisir un  nom de gène\n";
my $essai = <STDIN>;
chomp($essai);
$essai =~ /^[A-Z]+\d?$/   or die ("format incorrect");

while ($essai =~ /^[A-Z]+\d?$/){
    if (! exists($genes{$essai})){
        print "le gène entré n’est pas dans la table.\n";
    }
    else{
        print "$genes{$essai} \n";
    }
    $essai = <STDIN>;
    chomp($essai); 
    $essai =~ /^[A-Z]+\d?$/   or die ("format incorrect");   
}

