useful perl script of mine