updated logic for perlbrew and rbenv