Bonjours , tout d'abord faisons les présentations :
Me donne en erreur :
Code perl : 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 52 sub Traitement () { 53 my @vlan = @_; 54 my $desc; 55 my @ligne; 56 my $fh3, 57 my $fh2; 58 my $fh; 59 my $fichier, 60 my $fichier2; 61 my $code; 62 my $client="C:\\Users\\g-telecom-az\\Desktop\\Code_Client.txt"; 63 my $Vlan="C:\\Users\\g-telecom-az\\Desktop\\vlanlist.txt"; 64 my $Conf="C:\\Users\\g-telecom-az\\Desktop\\ConfV.txt"; 65 for (my $i = 1; $i <= 4096; $i++) { 66 open($fh2, '<',$Vlan) or die print ("[$Vlan] n'existe pas"); 67 if (defined ($vlan[$i]){ 68 while ($fichier = <$fh2>){ 69 if ($fichier=~m/ $i;/) { 70 @ligne = split(/;/,$fichier); 71 $desc=pop @ligne; 72 } 73 } 74 close ($fh2); 75 open($fh, '<',$client) or die print ("[$client] n'existe pas"); 76 while ($fichier2 = <$fh>) { 77 @ligne = split(/;/,$fichier2); 78 if ($ligne[0] eq $vlan[$i]) { #POSSIBLE SOURCE D'ERREURS 79 $desc="$desc:$ligne[2]"; 80 } 81 } 82 83 }open($fh3,'>',$Conf); 84 print ($fh3 "$desc\n"); 85 } 86}
Code MD-DOS : 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 syntax error at E:\Atos\Projet_Final\verif_Vlan.pl line 68, near "){" Global symbol "$fh2" requires explicit package name (did you forget to declare "my $fh2"?) at E:\Atos\Projet_Final\verif_Vlan.pl line 75. Global symbol "$fh" requires explicit package name (did you forget to declare "my $fh"?) at E:\Atos\Projet_Final\verif_Vlan.pl line 76. Global symbol "$client" requires explicit package name (did you forget to declare "my $client"?) at E:\Atos\Projet_Final\verif_Vlan.pl line 76. Global symbol "$client" requires explicit package name (did you forget to declare "my $client"?) at E:\Atos\Projet_Final\verif_Vlan.pl line 76 . Global symbol "$fichier2" requires explicit package name (did you forget to declare "my $fichier2"?) at E:\Atos\Projet_Final\verif_Vlan.pl line 77. Global symbol "$fh" requires explicit package name (did you forget to declare "my $fh"?) at E:\Atos\Projet_Final\verif_Vlan.pl line 77. Global symbol "@ligne" requires explicit package name (did you forget to declare "my @ligne"?) at E:\Atos\Projet_Final\verif_Vlan.pl line 78. Global symbol "$fichier2" requires explicit package name (did you forget to declare "my $fichier2"?) at E:\Atos\Projet_Final\verif_Vlan.pl line 78. Global symbol "@ligne" requires explicit package name (did you forget to declare "my @ligne"?) at E:\Atos\Projet_Final\verif_Vlan.pl line 79. Global symbol "@vlan" requires explicit package name (did you forget to declare"my @vlan"?) at E:\Atos\Projet_Final\verif_Vlan.pl line 79. Global symbol "$i" requires explicit package name (did you forget to declare "my $i"?) at E:\Atos\Projet_Final\verif_Vlan.pl line 79. Global symbol "$desc" requires explicit package name (did you forget to declare"my $desc"?) at E:\Atos\Projet_Final\verif_Vlan.pl line 80. Global symbol "$desc" requires explicit package name (did you forget to declare"my $desc"?) at E:\Atos\Projet_Final\verif_Vlan.pl line 80. Global symbol "@ligne" requires explicit package name (did you forget to declare "my @ligne"?) at E:\Atos\Projet_Final\verif_Vlan.pl line 80. syntax error at E:\Atos\Projet_Final\verif_Vlan.pl line 84, near "}" E:\Atos\Projet_Final\verif_Vlan.pl has too many errors.
Je ne trouve pas où est ce que j'ai p déclarer mes variables en trop ou pourquoi quand je les déclare il me dit qu'elle ne sont pas déclarer ...
Merci d'avance ...
Partager