in reply to How to configure CPAN automatically?

If you want multiple Enters, you can give the `yes` command a parameter of '' empty string.

yes ''|cpan

If you want just one Enter — as `cpan` only requires the first one to begin automatically deciding on the remainder of the prompts, you can just pipe in an `echo`.

echo|cpan

Alternatively, if you feed an empty pipe in, that also seems to work.

cpan < /dev/null