use strict; use locale; if ( $#ARGV != 0 ) { die "Usage :", $0, "recherche-exacte-simple.pl mot_recherche\n"; } my $recherche = $ARGV[0]; my $trouve = 0; while ( my $ligne = ) { chomp $ligne; if ( (lc $ligne) eq (lc $recherche) ){ $trouve = 1; last; } } if ( $trouve ) { print "Le mot \"", $recherche, "\" apparaît dans l'entrée\n"; } else { print "Le mot \"", $recherche, "\" n'apparaît pas dans l'entrée\n"; }