in reply to Trouble installing Net::SFTP

make1: as: Command not found make1: *** kernel.o Error 127

The short answer. Add /usr/ccs/bin to your path and try again.

My environment is - SunOS 5.8 gcc version 2.95.2 19991024 (release) ....at /usr/local/bin

You look like you are close to getting this to work. I've spoken with a few people trying to get this up and running on Solaris 8 and 9. So far I haven't come across anyone who has been successful for a variety of reasons. I've even tried replacing Perl with sunfreeware's Perl (built with gcc), How I resolved it was replacing the Sparc server with a Linux server. I was able to build the environment without (many) problems :-)
make[1]: Leaving directory `/usr1/duser/.cpan/build/Math-Pari-2.010703 +/libPARI' make: *** [libPARI/libPARI.a] Error 2 /usr/local/bin/make -- NOT OK
libPARI is a OS library you need installed before you can install the Math-Pari perl module. I had to install it manually before Math-Pari would build properly. I would recommend not installing it with CPAN. I would download the module and build it myself.

I believe CPAN makes a few presumptions which have caused me grief on occasion. With the high number of dependancies, I had on occasion made a few mistakes when building the modules. I got into the habit of running "make test" after building each module. It's possible a previous module didn't build properly and is affecting you here. Math-Pari IMO was one of the more difficult to build.

I've written a number of Perl programs using Net::SSH::Perl. Personally I like it however I've run into problems manipulating STDERR (don't ask). I'm close to solving it (I hope). When I searched CPAN I noticed the author (Dave Robins) had stopped developing this and will only release fixes. There is another module he released in January. You might find it useful.

http://search.cpan.org/~dbrobins/Net-SSH2-0.06/

Good Luck!