This is pretty easy as I had the same issue on my sun boxen, when you attempt to build perl it will look for a C compiler and often fails without having GCC installed. There seems to be some sort of bug in solaris 8 on the sparc platform (64 bit Full OEM install), I have also ran across this in 9. What system are you building on SunOS or Sun4u? Also on a side note go out to cpan and grab perl again and check the MD5 checksum. I had another issue like this and it was a bad binary get of perl.
in reply to Help building 5.8 on Solaris