I see now that I did not do quite what that says. I added the exec path after the bin and site\bin paths. If I just put the exec folder or put it in front of the bin and site\bin folders, then the ‘can’t load dll’ issue goes away.
That’s great, but also it’s slightly annoying that information has only come to light via this forum.
The only information I have seen prior to responses here is:
‘For editors and other tooling use the executables at: C:\Perl-5.36.1\exec.’
I have seen nothing about the requirement for exec to be above bin and site\bin.
At times when I have temporarily had more than one version of Perl installed, I would sometimes put the path to the executable at the command prompt, e.g. C:\Perl64\bin\perl. I have been doing the same with Perl 5.36, but now I know it should be, for example, C:\Perl-5.36.1\exec\perl rather than C:\Perl-5.36.1\bin\perl, otherwise it may not work.
It seems that the perl executables with the same name in both exec and bin run in parallel. Let’s hope that doesn’t break anything then! Unfortunately, it does! Any scripts looking at perl processes now need a filter to remove the duplication. I’d better get to it!