while (<>){ chomp; my $voir = $_; $voir =~ s/o/"y"/gem; say $voir; } #### while (<>){ chomp; my $voir = $_; $voir =~ s/o/"y"/gem; my $Fichiersortie = 'sortie.txt'; open my $sortie, ">", $Fichiersortie or die "Can't open $Fichiersortie: $!"; say $sortie $voir; close($sortie); }