in reply to Link Net::SSLeay to custom-built OpenSSL
You might want to check:
(a) if your libssl.so does in fact live in the above RUNPATH .../openssl-0.9.8p/lib, and (b) if that path is actually being written to SSLeay.so. Check RUNPATH/RPATH settings with
$ dump -Lv .../SSLeay.so
The theory is that the linker (ld) puts the lib search path(s) into the .so (or binary), and the dynamic linker (ld.so.1) then picks it up from there...
(See also LD_RUN_PATH, and the option -R, in the ld man page.)