Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Compressing a set of integers

by I0 (Priest)
on Jan 26, 2003 at 16:47 UTC ( [id://229988] : note . print w/replies, xml ) Need Help??


in reply to Compressing a set of integers

foreach( @array ){ my @a = sort{$a<=>$b}split/,/; my $d=0; for( @a ){ ($d,$_)=($_,$_-$d); } $_ = pack'w*',@a; }