Updated version of perl API script with working examples, etc.