CLI-TextLines-Utils
view release on metacpan or search on metacpan
scripts/alluniq view on Meta::CPAN
484950515253545556575859606162636465666768
return
1
if
$o
{
q} ;
print STDERR # {$o{q}
? \* STDOUT : \
*STDERR
}
CYAN
"Some counted lines are "
, BRIGHT_RED
"same. "
,
CYAN ,
"Different "
, BRIGHT_CYAN (
scalar
keys
%str2cnt
) , CYAN
" / All "
, BRIGHT_CYAN $. .
" ; "
,
CYAN ,
"Maximum multiplication : "
, BRIGHT_CYAN max(
values
%str2cnt
) ,
CYAN
" ($Script)\n"
;
return
1 ;
}
}
sub
tableOutput( ) {
## 2. 度数nã®ç•°ãªã‚‹æ–‡å—列ãŒã€å…·ä½“çš„ã«ã©ã‚“ãªå€¤ã§ã‚ã£ãŸã‹ã€‚
while
(
my
(
$str
,
$cnt
) =
each
%str2cnt
) {
push
@{
$cnt2strs
{
$cnt
} },
$str
;
}
my
$msep
=
$o
{2} ?
"\n"
:
"\t"
;
$o
{2} ?
"mult\tfreq\n"
:
"mult\tfreq\texamples\n"
;
for
my
$count
(
sort
{
$a
<=>
$b
}
keys
%cnt2strs
) {
"$count\t"
,
scalar
@{
$cnt2strs
{
$count
} },
$msep
;
next
if
$o
{2} ;
# -2 指定ã®å ´åˆã¯ã€è©²å½“æ–‡å—列ã®ä¾‹ã‚’出力ã—ãªã„。
( run in 0.261 second using v1.01-cache-2.11-cpan-e9199f4ba4c )