Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

All the instructions I can find for running CPAN on Mac OS X (eg. 1, 2 & 3) say to start by running this command in terminal:

sudo perl –MCPAN –e shell

However when I do so I get this error:

Can't open perl script "–MCPAN": No such file or directory

Why is this and how can I fix it? I'm running Lion (10.7.3) and have installed XCode 4.2.1.

share|improve this question
up vote 1 down vote accepted

Try this:

sudo cpan

cpan is an executable that comes installed in OS X (or installs with Xcode).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.