Help for this page
grep { $h1{$_}=1 } @{$all[0]};
grep { $h1{$_}=1; undef; } @{$all[0]};
@h1{@{$all[0]}}=(1) x @{$all[0]};