I'm having the same problem as described in the closed question "https://tex.stackexchange.com/questions/104350/problem-regarding-latexdiff-perl-and-miktex-2-9-on-win7".
Following the solution does not work in my case. However, the error message now includes the path I added (see below).
I've installed latexdiff via MikTeX 2.9 console on Win10. Originally tried with ActivePerl, then uninstalled and installed Strawberry Perl. Issue persists.
$ latexdiff
Can't locate Algorithm/Diff.pm in @INC (you may need to install the Algorithm::Diff module) (@INC contains: C \Strawberry\perl\site\lib /usr/lib/perl5/site_perl /usr/share/perl5/site_perl /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5/core_perl /usr/share/perl5/core_perl) at C:\Users\pea77\AppData\Local\Programs\MiKTeX 2.9\scripts/latexdiff\latexdiff line 193.
BEGIN failed--compilation aborted at C:\Users\pea77\AppData\Local\Programs\MiKTeX 2.9\scripts/latexdiff\latexdiff line 193.
However I still get the error Can't locate Algorithm/Diff.pm in @INC (you may need to install the Algorithm::Diff module) when using latexdiff
– Hao S Apr 11 '22 at 05:07C:\Strawberry\perl\binin order to run the command. If this is the case, it seems that your path is misconfigured, and the version of Perl used by latexdiff is different from the one you're using to install the package. For example, in my installation latexdiff probably pulls Perl fromAppData/Roaming/TinyTeX/tlpkg/tlperl/bin/perl.exe. – Diomidis Spinellis Apr 12 '22 at 07:57