in reply to Golf: List spliting

My try; slow, not very short, but interesting (uses one of my favorite modules):
use strict; use Quantum::Superpositions qw(any); my @r = (0..25); sub c { ($_[0]%3)==0; } ## sub S{my@Q=@_;@_=grep{c($_)}@Q;@Q=grep{any(@_)ne$_}@Q;@_} ## print S(@r);
50 chars for the sub body, 36 for the use line.