wrote:
> masterpiece(noun)
> 1 : a work done with extraordinary skill; especially : a supreme
> intellectual or artistic achievement
> 2 : a piece of work presented to a medieval guild as evidence of
> qualification for the rank of master
>
>
> What constitutes a masterpiece in Perl?
#!/usr/bin/perl
use Net::NNTP;
my $nntp = Net::NNTP->new("news.server");
my $groups = $nntp->list();
for (keys %$groups)
{
print "group: $_\n";
$nntp->group($_);
my %spam;
my %extra_spam;
while (my $a = $nntp->head())
{
for (@$a)
{
if (/^from:/i)
{
/<(.*)>/;
$spam{$1}++ if $1;
$extra_spam{$1}++ if $1 =~ /NOSPAM/;
print $1, "\n" if $1;
}
}
$nntp->next();
}
}
$nntp->quit;