in reply to Optimization of DB_File sorting and processing code
my @matrix; while (my $file = glob "*.db") { tie my %hash, "DB_File", $file, O_RDONLY, 0644 or warn("Could not read $file: $!") and next; # presize the array the first time @matrix = map [], 1 .. keys %hash unless @matrix; my $i = 0; for (sort keys %hash) { push @{ $matrix[$i++] }, $hash{$_}; } }
_____________________________________________________
Jeff[japhy]Pinyan:
Perl,
regex,
and perl
hacker.
s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;
|
|---|