I have a
Perl project (developed in Ubuntu 14.04) which cannot be built on
perl 5.18.2, but it works on
Perlbrew 5.22.0. I have tried to use
M-x perldb in
Emacs but it looks like
Perl 5.18.2 by default. Is there a way to choose
Emacs for debugging?
The simplest way is probably to ensure the correct Perlbrew perl binary is used in the same way as usual for Perlbrew, and then launch Emacs in that environment.
Normally that would be something like
perlbrew switch X perlbrew use X
See also: https://perlbrew.pl/