I don't know perl, so if you improve this script, commit it or submit it to bryan.