Might have to put a few more words around that. Do you mean that for each element n you want to compare $array1(n) with $array2(n) ?
Or do you want to check to see if $array1(n) can be found anywhere in @array2 ?
Post what you have so far, as well, as this might give a clearer indication of what you want...
Steve
[small]"Every program can be reduced by one instruction, and every program has at least one bug. Therefore, any program can be reduced to one instruction which doesn't work." (Object:erlDesignPatterns)[/small]
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, '', '')
I doubt this is really want you want. You were extremely unclear and honestly sounded drunk in your description. But if you really are drunk, then you won't notice when this code isn't what you want, and will give me a star anyway.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.