All pastes #710579 Raw Edit

Miscellany

public text v1 · immutable
#710579 ·published 2007-09-25 16:58 UTC
rendered paste body
$t=0;
while(<>){
 ~ tr/ //d;
 ~ s/F,.*$//;
 my ($i,$f) = split("\\.");
 $ints[$t]=$i;
 $fracs[$t]=$f;
 $t++;
}
print "$t\n";
$ilen=(sort {$b <=> $a} map {length} @ints)[0];
$flen=(sort {$b <=> $a} map {length} @fracs)[0];

$ilen = $ilen + 1 + $flen;
print "$ilen,$flen\n";
$pat = "%${ilen}d.%-${flen}d";
for($t=0;$t<=$#fracs;$t++){
 printf "%${ilen}d.%-${flen}d\n",$ints[$t],$fracs[$t];
}