Remove hard-coded paths from Ruby environment variables
More robust handling of GEM_PATH
Run simple checks on Ruby environment before installing Perl
Add a "finish" function to ensure cleanup after unexpected script exit
Remove "module load cpanm". Instead use the existing version of cpanm to install the latest one, then use the latest cpanm for all other Perl installation.