You don't really need the arrays @p, @q and @i, you could just do this:
my %f; for my $file ( @files ) { open my $IN, '<', $file or die "Cannot open '$file' because: $!"; while ( <$IN> ) { /^(.*)\t(.*)$/ && $f{ $1 } += $2; } } open my $OUT, '>', $outpath or die "Cannot open '$outpath' because: $! +"; for my $key ( sort { $f{ $b } <=> $f{ $a } } keys %f ) { print $OUT "$key\t$f{$key}\n"; }
In reply to Re: Long list is long
by jwkrahn
in thread Long list is long
by Chuma
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |