Uninitialized value in concatenation (.) or string at

If I have a code that will return $id= 0 and $id= 1 randomly but I would like to make it to get the $id=0 always first…how should I do it?

foreach my $link (sort @linker:sick:){
my $id = XMLP::Attribute($link,“ID”);
$substr .= “_csi” ;
$substr .= $id ;
}
$style .= $substr;

and the end result should be always style_csi0_csi1 always…
:sick:

You’re being pretty sparse with your code, I cannot look in your head :wink:

Based on this limited information I have no idea what’s going on… If I were you, I’d check the workings (documentation) of XMLP::Attribute and see what it returns based on which arguments. Use the debugger.