I've tried to get
Net::SSH2 running in Solaris but the underlying libssh2 doesn't like to compile in Solaris. I have had better success with
Net::SFTP::Foreign, which often works well when
Net::SFTP simply hangs.
As far as the different perls go, check the PATH variable as root and the user account. The command 'set' will usually list all your environment variables. If 'which' is supported by your shell, run 'which perl' in both environments.