Use =~ instead of eq when comparing arrays