First I read 2 files and put them in 2 different arrays.
Then i want to compare elements of 2 arrays
This is my code for comparing array elements:
both of the elements of the 2 arrays are identical when I print them but the if statement evaluates to false anyaways? What is wrong with this statement?if ($array2[2] eq $array1[2] ) { print $array2[2]; print "\n"; }
Edit kudra, 2001-12-23 Added code tags
In reply to comparing elements of two arrays by luke123
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |