The "uninitialized" message is a warning that means that the @elements
array has fewer than 7 items in it. You could avoid that warning by checking how many items are in the array before you check the item at index 6:
sub check_paired{
my $check_paired = 0;
my $path = shift;
my $line = `zcat $path|tail -n 1`;
my @elements = split(//, $line);
if (@elements > 6) {
$check_paired = 1 if $elements[6]=~m//.$/;
}
return $check_paired;
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…