You can also create a "Bundle" file using the autobundle command of the cpan client to list all modules for later reinstallation:
cpan -a
...
Package namespace installed latest in CPAN file
+
Algorithm::C3 0.10 0.11 HAARG/Algorithm-C3-0.11
+.tar.gz
Algorithm::Diff 1.1903 1.201 RJBS/Algorithm-Diff-1.2
+01.tar.gz
...
Wrote bundle file
/home/corion/.local/share/.cpan/Bundle/Snapshot_2021_07_05_00.pm
The list of modules listed in this bundle can then be installed in another environment using:
perl -MCPAN -e 'install Bundle::Snapshot_2021_07_05_00'
(as the module itself says)