push @{ $_ < $ave ? \@lower : \@higher }, $_ for @array;