- or download this
WORD: while (my $word = pop @words) {
# lower-case it
...
# If there's no entry, add a new entry
push @counta, [ $word, 1 ];
}
- or download this
WORD: while (my $word = pop @words) {
# lower-case it
...
# count, if not found create new entry.
$counth{$word}++;
}
- or download this
$ perl t.pl
...
array 41.5/s 372% -- -98%
hash 2070/s 23419% 4887% --
- or download this
#!/usr/bin/perl
...
}
=cut