if (grep { $$self{Matrix}[$row_index][$_] != $$other{Matrix}[$$mapping[$row_index]][$$mapping[$_]]); } (0..$#$mapping)); ( { ^ } ( ))