Copying perl mods from install_scot3.sh