perl script to automate execution