use strict; use locale; my %invariable; open ( INVAR, "<", "noms-invariables.txt"); while ( my $ligne = ) { chomp $ligne; $invariable{$ligne} = 1; } close (INVAR); print "Entrez un nom commun singulier : "; my $nom = ; chomp $nom; my $pluriel; if ( defined ( $invariable{$nom} ) ) { $pluriel = $nom; } else { $pluriel = $nom . "s"; } print "Le pluriel de \"", $nom, "\" est : \"", $pluriel, "\"\n";