#!/usr/bin/perl -w use strict; use SiteSummary; my %profiles; my %versions; for_all_hosts(\&handle_host); print_summary(); exit 0; sub handle_host { my $hostid = shift; my $profile = get_debian_edu_profile($hostid); my $version = get_debian_edu_ver($hostid); $profiles{$profile}++ if (defined $profile); $versions{$version}++ if (defined $version); } sub print_summary { printf(" %-30s %5s\n", "debian-edu-profile", "count"); foreach ( keys %profiles ) { printf(" %30s %5s\n", $_ || "n/a", $profiles{$_}); } printf(" %-30s %5s\n", "debian-edu-version", "count"); foreach ( keys %versions ) { printf(" %30s %5s\n", $_ || "n/a", $versions{$_}); } }