how to call perl function