use 5.12.0; use strict; use warnings; use diagnostics; use List::MoreUtils; open my $TEST, '<', $f_Test or die "Could not open=> $f_Test : $!"; my $data; while (my $scalar=<$TEST>) { chomp($scalar); [my $a, my $b]=firstidx { $_ == $scalar } @arrayPFA; if(!exists $a) { $data=$arrayPFA[$b]; } elsif(if any { ! defined($scalar) } @arrayT;) { $data=1.0; } else { $data=0.0; }; }; close $TEST