More perl fixes