You're definitely modifying the right files, and no, there shouldn't be any other files that you need to modify, but double check the following:
The ciwweb.pl and admin.pl files that are in
need to have the updated shebang line (i.e.:
) and the shebang line has to be correct.
In this case it looks like you're relying on the new Perl executable to be in the PATH environment variables of the user running the perl scripts. The user running the Perl scripts is probably www-data.
If you know the absolute path to your new Perl executable and these other things aren't working, I'd try replacing the:
with the absolute path of the new Perl executable created by Perl Brew.