## PERL_DEFAULT is used by various utilities that need to have 
## access to some version of Perl while we are in the middle of
## swapping Perl versions. See addpath and delpath for example.
export PERL_DEFAULT=/usr/bin/perl

## This setting tells swap_perl that there is no current version to 
## swap out of before swapping in the requested version.
export PERL_CURRENT_VERSION='initial'

## Do it
swap_perl 5.6.1

Example 6: Setting the default Perl environment in perl.sh.

Back to Article