convert setup shell script into a setup perl script