while ( defined (my $scalar=<$TEST>) ) # This will accommodate the case when $seclar is Zero { chomp($scalar); my ( $a, $b ) =firstidx { $_ == $scalar } @arrayPFA; # $a and $b are NOT good names - they have special meanings in perl if(!defined $a) { $data=$arrayPFA[$b]; } elsif(if any { ! defined($scalar) } @arrayT;) # No idea what is intended here... { $data=1.0; } else { $data=0.0; }; };