Build script redone in perl