[Rio-pm] Quem tem mais incremento em 2008 ?!?!

Daniel de Oliveira Mantovani daniel.oliveira.mantovani em gmail.com
Quarta Setembro 10 23:18:30 PDT 2008


Quem tem mais incremento em 2008 ?!?!
hehe
O Fernando me passou um desafio para ver quantos ++ cada um tem, o Eden^^ e
o Blabos^^ me ajudaram.
wget http://mail.pm.org/pipermail/rio-pm/2008q3.txt

depois

#!/usr/bin/perl

use strict;
use warnings;
open(ARQ,"<2008q3.txt");
my @arquivo = <ARQ>;
my @more = ();
foreach (@arquivo){
my @more = unshift(@more,$1) if $_=~ /(\w{4,}\S+)\+\+/g
}
for (0 .. scalar(@more) -1){
$more[$_] =~ s/\s.*//
}
my %hash;
$hash{$_}++ for @more;
print "$_ = $hash{$_}\n" for keys %hash

-- 
Daniel de Oliveira Mantovani
"A sede pelo aprendizado é insaciável"
http://mantovanihouse.blogspot.com/
------------------------------------------------------------
-------------- Próxima Parte ----------
Um anexo em HTML foi limpo...
URL: <http://mail.pm.org/pipermail/rio-pm/attachments/20080911/94ef5b74/attachment.html>


Mais detalhes sobre a lista de discussão Rio-pm