salut,
#!/usr/bin/perl -w
my $file1 = $ARGV[0];
my $file2 = $ARGV[1];
open(my $old, '<', $file1) or die "Can't open $file1: $!";
open(my $new, '<', $file2) or die "Can't open $file2: $!";
my %found_email = map { (split /;/)[3] => 1 } <$old>;
map {print if not $found_email{ (split /;/)[3] }} <$new>;
pe en rajoutant chomp ?
my ($new,$old) =
map { open my $fh, '<', $_ or die "Can't open $_: $!"; $fh }
@ARGV;
my %found_email = map {chomp; (split /;/)[3] => 1 } <$old>;
map {chomp; print if not $found_email{ (split /;/)[3] }} <$new>;
par contre: ton fichier est un CSV comme son nom l'indique: il y a
plein de cas que tu ne prend pas en compte en splitant naivement sur ';'
(par exemple un champ qui contiendrait un ";").
pour rendre ton script robuste, ne réinvente pas la roue et utilise
Text::CSV ou mieux Text::CSV::Simple.
si j'en ai le temps, je t'écrirais un exemple plus tard.