in reply to I need to know if 32-bit or 64-bit perl is running my script.
That's nasty, I hope you're writing something that will abstract this away for others :)
In C you could check if 0 == 1L<<32 but that would effectively identify your userland which IIRC doesn't have to match the kernel on Solaris. In Perl, even an interpreter running in 32bit userland can use 64bit ints so not even that works. I suppose the most reliable way would be to parse uname -a output somehow.