in reply to Golf: List spliting
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); [download]