cli-test: Use perl instead of nc for portability.