in reply to intersection of scalar with 1D array and 2D array Matlab=>Perl
while ( defined (my $scalar=<$TEST>) ) # This will accommodate the cas +e when $seclar is Zero { chomp($scalar); my ( $a, $b ) =firstidx { $_ == $scalar } @arrayPFA; # $a and $b ar +e 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 inte +nded here... { $data=1.0; } else { $data=0.0; }; };
"You're only given one little spark of madness. You mustn't lose it." - Robin Williams
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: intersection of scalar with 1D array and 2D array Matlab=>Perl
by choroba (Cardinal) on Aug 30, 2014 at 07:45 UTC | |
by NetWallah (Canon) on Aug 31, 2014 at 01:20 UTC | |
|
Re^2: intersection of scalar with 1D array and 2D array Matlab=>Perl
by f77coder (Beadle) on Aug 30, 2014 at 04:28 UTC |