Problem description.
Scrounged around in the documentation to Math::Prime::Util and found this under the examples section.
Math::Prime::Util