Aside from losing the order, I don't see a problem with the way you are doing it. It scales well, O(N+M) compared with the naïve solution's O(N*M).
If you care about the order, you can use
my %seen; @all_checked = grep !$seen{$_}++, @account, @checked_account;
In reply to Re: Comparing arrays and efficiency
by ikegami
in thread Comparing arrays and efficiency
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |