Battery perl script