I do something like this:
$ perl -e 'eval { my @foo;$foo[2**32]="1" } || warn("Not big enough\n"
+)'
That will warn with a 32-bit perl. However, the pointer size of an executable binary (and the libs it's linked against) doesn't necessarily tell you whether the OS is 32- or 64-bit. On many OSes (not sure about Solaris) a 32-bit binary can run on 32- or 64-bit OSes. Also beware that a perl with 32-bit pointers on a 32-bit OS can still, if compiled with the right options, have 64 bit integers and access large files.