Initial, stable version of the perl script.