edwardsal
Technical User
- Nov 3, 2006
- 13
how I can filter only data that = I want from 2 array?
I have to array
@array1=("1","2","3");
@array2=("1");
so how I can make if statment if some element from array1=array2 than true else false?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
my @a1=("1","2","3");
my @a2=("1");
my @conditionals = map {defined $a1[$_] && defined $a2[$_] && $a1[$_] eq $a2[$_]} (0..($#a1> $#a2? $#a1: $#a2))
# @conditionals equals (1, '', '')