File: sample.pl

package info (click to toggle)
libalgorithm-hyperloglog-perl 0.24-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 184 kB
  • sloc: perl: 222; ansic: 87; makefile: 3
file content (16 lines) | stat: -rw-r--r-- 210 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use strict;
use warnings;
use utf8;
use Algorithm::HyperLogLog;

my $hll = Algorithm::HyperLogLog->new(10);

while(<>){
    next if !defined $_;
    $hll->add($_);
}


my $cardinality = $hll->estimate;

__END__