This script is a generic Perl script template that I created a while back so I could easily leverage a lot of the basic actions that I typically need when working with the API. I don't always need everything in it but it's easier to have one template to work from than a bunch of unique scripts.
Most of this is utility type functions for processing command line options, establishing a connection with the Grid Master and then having a spot for all of the "custom" code to perform specific operations. If there's interest, I'll post a couple of examples of specific tasks later.