fixing exchange perl script