foreach( @array ){ my @a = sort{$a<=>$b}split/,/; my $d=0; for( @a ){ ($d,$_)=($_,$_-$d); } $_ = pack'w*',@a; }
In reply to Re: Compressing a set of integers
by I0
in thread Compressing a set of integers
by toma
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |