Simple bar chart constructed from a csv file storing the number of ports in each category
#!/usr/local/bin/perl -w
use FreeBSD::Ports;
my @catagories =
(qw/
accessibility arabic archivers astro audio benchmarks biology
cad chinese comms converters databases deskutils devel dns
editors emulators finance french ftp games german graphics
hebrew hungarian irc japanese java korean lang mail math misc
multimedia net net-im net-mgmt net-p2p news palm polish
ports-mgmt portuguese print russian science security shells
sysutils textproc ukrainian vietnamese www x11 x11-clocks
x11-drivers x11-fm x11-fonts x11-servers x11-themes
x11-toolkits x11-wm
/);
my $ports = tie my %port, 'FreeBSD::Ports', '/usr/ports/INDEX-10';
foreach $catagory (@catagories)
{
my $ports_catagory = tie my(%ports_catagory), $ports;
$ports_catagory->category($catagory);
my $catagory_count = scalar keys (%ports_catagory);
printf("%13s %i\n", $catagory, $catagory_count);
}