Bonjour ,
Y a t-il un moyen plus court et plus clair d'écrire ça :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
foreach $ligne1 (@lots){
		chomp ($ligne1);
		($a,$b,$c,$d,$e,$f,$g,$h,$i,$j,$k,$l,$m,$n)=split (/;/,$ligne1);
		if ($e !~ /^T$/) {
			if ($e !~ /^Td$/) {
				if ($e !~ /^Tt$/) {
					if ($e !~ /^Ttd$/) {
						if ($e !~ /I/) {
							if ($e eq "P") {
								if ($a =~ /16X/) {
									if ($l != 1) {
										print RES "$a $b $c $d $e $f $g $h $i $j $k $l $m $n\n";
									}
								}
								elsif ($a =~ /^FE/) {
									if ($l != 2) {
										print RES "$a $b $c $d $e $f $g $h $i $j $k $l $m $n\n";
									}
								}
								elsif ($a =~ /^CENT/) {
									if ($l != 2) {
										print RES "$a $b $c $d $e $f $g $h $i $j $k $l $m $n\n";
									}
								}
							}
							elsif($l != 0) {
								print RES "$a $b $c $d $e $f $g $h $i $j $k $l $m $n\n";
							}
							elsif ($e =~ /C/) {
								print RES "$a $b $c $d $e $f $g $h $i $j $k $l $m $n\n";
							}
							elsif ($e =~ /e/) {
								print RES "$a $b $c $d $e $f $g $h $i $j $k $l $m $n\n";
							}
							elsif ($e =~ /b/) {
								print RES "$a $b $c $d $e $f $g $h $i $j $k $l $m $n\n";
							}
							elsif ($e =~ /d/) {
								print RES "$a $b $c $d $e $f $g $h $i $j $k $l $m $n\n";
							}
						}
					}
				}
			}
		}
	}
Merci pour vos conseils