in reply to How can I track down why perl 5.34.0 will install on one user account on macos with perlbrew and not another?

You say Perl installs when logged in on one account but fails when logged in on another. The code you exhibit forks, and the parent waits while the child execs command echo foo. It looks like on the failing account this command says 'hi'.

When you log in to the failing account and issue the command type echo, what do you get?