my %domain_stats = (
'www.perlmonks.com' => {
'country' => 'USA',
# ... other very much needed fields ...
},
'www.google.ca' => {
'country' => 'Canada',
},
'www.foobar.com' => { # does this one exist even? ;)
'country' => 'Nebukadnezaria',
},
);
for (sort {$domain_stats{$a}{country} cmp $domain_stats{$b}{country}} keys %domain_stats) {
print "Domain: $_; Country: $domain_stats{$_}{country}\n";
}
####
Domain: www.google.ca; Country: Canada
Domain: www.foobar.com; Country: Nebukadnezaria
Domain: www.perlmonks.com; Country: USA
####
$"=q;grep;;$,=q"grep";for(`find . -name ".saves*~"`){s;$/;;;/(.*-(\d+)-.*)$/;$_=["ps -e -o pid | "," $2 | "," -v "," "]`@$_`?{print"+ $1"}:{print"- $1"}&&`rm $1`;print"\n";}