perl script working