Adding perl sample. It can be improved via Proxy classes.