Perl giving out of memory errors when installing a package

Noticed the other day that CPAN was out of date. When attempting to update it with:
cpan install Bundle::CPAN it errors out with an “out of memory” message.

This is typically caused on AIX because of hitting a ulimit. If you run ulimit -a it should show you the current settings. Try setting the memory settings to unlimited with:

ulimit -m unlimited
ulimit -d unlimited

Worked like a charm in my case.