A
Alextophi
FR ---------------------------------------------------------
bonjour
j'ai un problème d'initialisation de variable $SCHED[$v] ($v=0 à 7),
mais je ne sais pas comment faire pour y remedier.
La variable $SCHED[$v] est parfois vide, et donc j'ai un message
d'erreur 'Use of uninitialized value in ...'
d'avance merci
christophe
EN ---------------------------------------------------------
hello
I have a problem of initialization of variable $SCHED[$v] ($v=0 to 7),
but I do not know how to make to solve.
The variable is sometimes empty, and thus I have an error message
in advance thank you
christophe
-CODE--------------------------------------------------------------------
471
472
473
474 my @SCHED = ();
475 @SCHED = split(" ", $SCHED_A);
476
477 for ($v=0; $v<7; $v++) {
478
479 if (substr($SCHED[$v],0,2) eq "Lu") { $SCHED[$v] = "Lundi" };
480 if (substr($SCHED[$v],0,2) eq "Ma") { $SCHED[$v] = "Mardi" };
481 if (substr($SCHED[$v],0,2) eq "Me") { $SCHED[$v] = "Mercredi"};
482 if (substr($SCHED[$v],0,2) eq "Je") { $SCHED[$v] = "Jeudi" };
483 if (substr($SCHED[$v],0,2) eq "Ve") { $SCHED[$v] = "Vendredi"};
484 if (substr($SCHED[$v],0,2) eq "Sa") { $SCHED[$v] = "Samedi" };
485 if (substr($SCHED[$v],0,2) eq "Di") { $SCHED[$v] = "Dimanche"};
486 if (substr($SCHED[$v],0,3) eq "Tlj") {$SCHED[$v] =
"Tous_les_jours"};
487
488 }
-RESULT-------------------------------------------------------------------
Use of uninitialized value in substr at Collecte_Networker.pl line 479,
Use of uninitialized value in substr at Collecte_Networker.pl line 480,
Use of uninitialized value in substr at Collecte_Networker.pl line 481,
Use of uninitialized value in substr at Collecte_Networker.pl line 482,
Use of uninitialized value in substr at Collecte_Networker.pl line 483,
Use of uninitialized value in substr at Collecte_Networker.pl line 484,
Use of uninitialized value in substr at Collecte_Networker.pl line 485,
Use of uninitialized value in substr at Collecte_Networker.pl line 486,
bonjour
j'ai un problème d'initialisation de variable $SCHED[$v] ($v=0 à 7),
mais je ne sais pas comment faire pour y remedier.
La variable $SCHED[$v] est parfois vide, et donc j'ai un message
d'erreur 'Use of uninitialized value in ...'
d'avance merci
christophe
EN ---------------------------------------------------------
hello
I have a problem of initialization of variable $SCHED[$v] ($v=0 to 7),
but I do not know how to make to solve.
The variable is sometimes empty, and thus I have an error message
in advance thank you
christophe
-CODE--------------------------------------------------------------------
471
472
473
474 my @SCHED = ();
475 @SCHED = split(" ", $SCHED_A);
476
477 for ($v=0; $v<7; $v++) {
478
479 if (substr($SCHED[$v],0,2) eq "Lu") { $SCHED[$v] = "Lundi" };
480 if (substr($SCHED[$v],0,2) eq "Ma") { $SCHED[$v] = "Mardi" };
481 if (substr($SCHED[$v],0,2) eq "Me") { $SCHED[$v] = "Mercredi"};
482 if (substr($SCHED[$v],0,2) eq "Je") { $SCHED[$v] = "Jeudi" };
483 if (substr($SCHED[$v],0,2) eq "Ve") { $SCHED[$v] = "Vendredi"};
484 if (substr($SCHED[$v],0,2) eq "Sa") { $SCHED[$v] = "Samedi" };
485 if (substr($SCHED[$v],0,2) eq "Di") { $SCHED[$v] = "Dimanche"};
486 if (substr($SCHED[$v],0,3) eq "Tlj") {$SCHED[$v] =
"Tous_les_jours"};
487
488 }
-RESULT-------------------------------------------------------------------
Use of uninitialized value in substr at Collecte_Networker.pl line 479,
Use of uninitialized value in substr at Collecte_Networker.pl line 480,
Use of uninitialized value in substr at Collecte_Networker.pl line 481,
Use of uninitialized value in substr at Collecte_Networker.pl line 482,
Use of uninitialized value in substr at Collecte_Networker.pl line 483,
Use of uninitialized value in substr at Collecte_Networker.pl line 484,
Use of uninitialized value in substr at Collecte_Networker.pl line 485,
Use of uninitialized value in substr at Collecte_Networker.pl line 486,