Updating to correctly build the perl version and re-ordering the script.