#!/usr/local/bin/perl # 1-10466 3 3 1-3561-5119-10466 $max=-9e99; $min=9e99; while(<>){ ($ft,$p1,$p2,$path,@r)=split(' ',$_); $count=0; (@rp)=split('-',$path); while($v=pop(@rp)){ if(!$v){last;} $count++; } $ar{$count}++; if($ar{$count} > $maxv){$maxv=$ar{$count};} if($count > $max){$max=$count;} if($count < $min){$min=$count;} $tv++; } foreach $key ( sort numerically ( keys %ar)) { $lv=$ar{$key}/$maxv; $accv=$accv+($ar{$key}/$tv); if($accv >= $target){ printf"%.6f\t%d\t%.6f\t%.6e\t%.6e\t%.4f\n", $key,$ar{$key},$lv,$accv,$ar{$key}/$tv,($key-$min)/($max-$min); $target=$target+$delta; } } sub numerically { $a <=> $b;}