Message dans le fichier log
Citation:
Use of uninitialized value in substitution (s///) at /data/infsvg/apache/lib/perl/infsvgApache.pm line 332.
Use of uninitialized value in concatenation (.) or string at /data/infsvg/apache/lib/perl/infsvgApache.pm line 333.
Use of uninitialized value in concatenation (.) or string at /data/infsvg/apache/lib/perl/infsvgApache.pm line 333.
Voici la fonction qui génére ces erreurs
Code:
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
| sub give_class_table {
my @classe=split(';',$_[0]);
my @selection=split(';',$_[1]);
my @rejet=split(';',$_[2]);
my $nb_el=@classe-1;
my $table="
<TABLE BORDER=1 class=periode cellspacing=0 cellpadding=0 align=center width=95%>
<TR>
<TD class=titleperiode ALIGN=CENTER>classes</TD>
<TD class=titleperiode ALIGN=CENTER>selection</TD>
<TD class=titleperiode ALIGN=CENTER>rejets</TD>
</TR>";
for ( my $k=0; $k < $nb_el ;$k++ ) {
$rejet[$k] =~s/^ / /;
$table=join('',$table,"
<TR>
<TD class=periode ALIGN=CENTER>$classe[$k]</TD>
<TD class=periode ALIGN=CENTER>$selection[$k]</TD>
<TD class=periode ALIGN=CENTER>$rejet[$k]</TD>
</TR>");
}
$table=join('',$table,"
</TR>
</TABLE>");
return $table;
} |
On utilise cette fonction, dans un autre script perl
Code:
my $Prevclasse=infsvgApache::give_class_table($row[9],$row[10],$row[11]);
Voici un exemple de valeur récupérée
Citation:
classes | selection | rejet
---------------------+-----------+-------
/etc/hosts ; | |
/etc/hosts ; | |
/data ; /etc ; | |
/data ; /etc ; | |
ALL_LOCAL_DRIVES ; | |
ALL_LOCAL_DRIVES ; | |
ALL_LOCAL_DRIVES ; | |
ALL_LOCAL_DRIVES ; | |
Avez-vous une idée concernant les raisons de ces messages d'erreurs?
D'avance merci pour votre aide