<html>
<head>
<style>
P
{
margin:0px;
padding:0px
}
body
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body>Segue os dois centavos de hoje abaixo...<BR><BR>&gt; &gt; dei uma melhorada no meu script... alguém quer me ajudar?<BR>
&nbsp;<BR>
Eu coloquei nomes de variáveis mais compreensíveis no seu código... não testei, então alguns erros gerados pela pragma strict podem acontecer.<BR><BR>
&lt;code&gt;<BR>#!/usr/bin/perl<BR><BR>
use warnings;<BR>use strict;<BR>use WWW::Mechanize;<BR>use IO::Uncompress::Gunzip;<BR><BR>my $browser = WWW::Mechanize-&gt;new;<BR>my $onde = shift || "rio";<BR>my %monks;<BR>$browser-&gt;get(" http://mail.pm.org/pipermail/$onde-pm/");<BR>my @links = $browser-&gt;find_all_links( url_regex =&gt; qr#\d{4}-\w+.txt#, );<BR><BR>for my $link (@links) { <BR><BR>&nbsp;&nbsp;&nbsp; print $link-&gt;url_abs(), $/;<BR>&nbsp;&nbsp;&nbsp; $browser-&gt;get($link-&gt;url_abs);<BR><BR>&nbsp;&nbsp;&nbsp; my $content = $browser-&gt;content();<BR>&nbsp;&nbsp;&nbsp; my $buffer;<BR><BR>&nbsp;&nbsp;&nbsp; if ($link-&gt;url_abs =~ /\.gz$/) {<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; my $unzip_content = new IO::Uncompress::Gunzip \$content;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;$unzip_content-&gt;read($buffer);<BR><BR>&nbsp;&nbsp;&nbsp; } else {<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $buffer = $content;<BR><BR>&nbsp;&nbsp;&nbsp; }<BR><BR>&nbsp;&nbsp;&nbsp; $buffer =~ s#&lt;code&gt;.*?&lt;/code&gt;##gsm;<BR>
&nbsp;<BR>
&nbsp;&nbsp;&nbsp; my $from;<BR><BR>
# que diabos é $a?<BR>
&nbsp;&nbsp;&nbsp; for my $a ( split m#$/#, $buffer ) {<BR><BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $from = $1 if $a =~ m#^\s*From: (.+)$#;<BR><BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if($a =~ /^\s*\(?([\w]+)\)?((:?\+|-){2})\s*(#.*)?$/) {<BR><BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # não dá para tirar esse eval daqui? seria melhor por questões de performance<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; eval "\$monks{" . lc $1 . "}$2";<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print "From: $from$/$a$/$/";<BR><BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>
&nbsp;&nbsp;&nbsp; }<BR>}<BR><BR>
print "$_ =&gt; $hash{$_}$/" for keys %monks;<BR><BR>
&lt;/code&gt;<BR><BR>[]'s<BR>
Alceu<BR><br /><hr />Invite your mail contacts to join your friends list with Windows Live Spaces. It's easy! <a href='http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mkt=en-us' target='_new'>Try it!</a></body>
</html>