Install "Command Line Tools for Xcode", either directly or
through Xcode, both available from
Apple Developer downloads
(free registration required). Xcode can also be installed through the
App Store application.

Open the Terminal.app (found in Applications -> Utilities)
and copy & paste the command below into it (then press the
'return' key):

curl -L http://xrl.us/installperlosx | bash

Once this is finished (it takes several minutes), quit the
Terminal app.