Script Perl - Informations
Résolu/Fermé
dimitri
-
9 juin 2009 à 14:56
lami20j Messages postés 21331 Date d'inscription jeudi 4 novembre 2004 Statut Modérateur, Contributeur sécurité Dernière intervention 30 octobre 2019 - 22 juil. 2009 à 08:52
lami20j Messages postés 21331 Date d'inscription jeudi 4 novembre 2004 Statut Modérateur, Contributeur sécurité Dernière intervention 30 octobre 2019 - 22 juil. 2009 à 08:52
A voir également:
- Script Perl - Informations
- Script vidéo youtube - Guide
- Entrer les informations d'identification reseau - Guide
- Microsoft activation script - Accueil - Windows
- Ghost script - Télécharger - Polices de caractères
- Quelles informations sont indiquées dans une url ? - Guide
23 réponses
lami20j
Messages postés
21331
Date d'inscription
jeudi 4 novembre 2004
Statut
Modérateur, Contributeur sécurité
Dernière intervention
30 octobre 2019
3 569
21 juil. 2009 à 19:40
21 juil. 2009 à 19:40
Re,
# à ne pas oublié qu'on est toujours dans la boucle while # pour chaque élément du tableau @conv_tab foreach $conv (@conv_tab) { # print "Conv : $conv \n"; if ($conv eq $conversation) { # si la variable $conv est égale avec $conversation # print "Conv existante ($conv , $conversation )\n"; $exist=1; # initialise la variable $exist $pkt_tab[$I]+=$packet; # équivalent avec $pkt_tab[$I] = $pkt_tab[$I] + $packet # donc tu remplis le tableau @pkt_tab # print " $pkt_tab[$I] \n"; last; # sortir de la boucle } $I++; # $I est incrementé } if (!$exist) { # on test la valeur de vérité de $existe # ! c'est pour négation # print "Conv non existante\n"; push(@conv_tab,$conversation); # on ajoute à @conf la variable $conversation push(@pkt_tab,$packet); # on ajoute à @pkt_tab,$packet # print @conv_tab; # print "\n"; } } } print "Tableau conversations \n"; $I=0; foreach (@conv_tab) { # pour chaque élément de tableau @conv_tab if ($pkt_tab[$I] > $seuil) { # on teste les éléments de @pkt_tab avec $seuil print "$pkt_tab[$I] $conv_tab[$I]\n"; # on affiche les éléments de @pkt_tab et @conv_tab } $I++; # incrémentatoin de $I }
thanks you very much my friend :)
i've now understand a little perl language.
it's hard .. but with you i'll upgrade my personal skill .
Thanks a lot :)
i've now understand a little perl language.
it's hard .. but with you i'll upgrade my personal skill .
Thanks a lot :)
lami20j
Messages postés
21331
Date d'inscription
jeudi 4 novembre 2004
Statut
Modérateur, Contributeur sécurité
Dernière intervention
30 octobre 2019
3 569
22 juil. 2009 à 08:52
22 juil. 2009 à 08:52
Salut,
De rien ;-)
De rien ;-)