perl -E "@ar=(1..3,5,6,7);$h{$_}++for$ar[0]..$ar[-1];delete$h{$_}for@ar;print keys %h" 4