perl script to create a .spawn file