50 chars for the sub body, 36 for the use line.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);
In reply to Re: Golf: List spliting
by premchai21
in thread Golf: List spliting
by Masem
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |