- or download this
#!perl -n
# llil2cmd.pl. Abbreviated version of llil2grt.pl.
...
push @l, pack('NA*',-$v,"$k\t$v") while ($k,$v)=each %h;
print substr($_,4) for sort @l;
}
- or download this
> time perl llil2grt.pl big1.txt big2.txt big3.txt >grt1.tmp
llil2grt start
...
real 0m33.475s
user 0m32.180s
sys 0m1.295s
- or download this
> time perl llil2cmd.pl big1.txt big2.txt big3.txt >cmd1.tmp
...
sys 0m1.093s
> diff cmd1.tmp grt1.tmp
- or download this
#!perl -n
# llil2cmd-long.pl. A long short version of llil2grt.pl.
...
warn "sort + output : $taken2 secs\n";
warn "total : $taken secs\n";
}
- or download this
$ time perl llil2cmd-long.pl big1.txt big2.txt big3.txt >long1.tmp
get_properties : 7 secs
...
sys 0m0.917s
> diff long1.tmp grt1.tmp
- or download this
wget https://www.cpan.org/src/5.0/perl-5.36.0.tar.gz
(update: run sha256sum perl-5.36.0.tar.gz and check matches https://ww
+w.cpan.org/src/5.0/perl-5.36.0.tar.gz.sha256.txt)
...
make 2>&1 | tee make.tmp
make test 2>&1 | tee test.tmp
make install 2>&1 | tee install.tmp
- or download this
use 5.036;
use experimental qw/for_list declared_refs/;
- or download this
while (my ($k, $v) = each %{$href}) { push @lines, pack('NA*', -$v, "$
+k\t$v") }
- or download this
for my ($k, $v) (%{$href}) { push @lines, pack('NA*', -$v, "$k\t$v") }
- or download this
$ cd $HOME/localperlmodules
$ type perl
...
$ make 2>&1 | tee make.tmp
$ make test 2>&1 | tee test.tmp
$ make install 2>&1 | tee install.tmp