CLI-Table-Key-Finder

 view release on metacpan or  search on metacpan

scripts/alluniq  view on Meta::CPAN

	    return 1 if $o{q} ;
	    print STDERR # {$o{q} ? \* STDOUT : \*STDERR }
	      YELLOW "Some counted lines are " , BRIGHT_RED "same.  " ,  
	      YELLOW , "Different " , CYAN (scalar keys %str2cnt) , YELLOW " / All " , CYAN $. . "; " , 
	      YELLOW ,  "Maximum multiplication : " , CYAN  max( values %str2cnt ) ,
	      "  ($Script)\n"  ;
	    return 1 ; 
	}
}

sub tableOutput( ) { 
    ## 2. 度数nの異なる文字列が、具体的にどんな値であったか。
    while ( my( $str, $cnt) = each %str2cnt ) {
       push @{ $cnt2strs {$cnt} }, $str ; 
    }
    my $msep = $o{2} ? "\n" : "\t"  ;
    print $o{2} ? "mult\tfreq\n" : "mult\tfreq\texamples\n" ;

    for my $count ( sort { $a <=> $b } keys %cnt2strs ) {
        print "$count\t", scalar @{ $cnt2strs {$count} }, $msep ; 
        next if $o{2} ; # -2 指定の場合は、該当文字列の例を出力しない。



( run in 0.235 second using v1.01-cache-2.11-cpan-65fba6d93b7 )