First of all thanks for your help,
I tried running it as you said: root > perl -I./lib/ -MTamarLog -e 'my $x = new TamarLog(); print $x->PrintError("YESH\n");'
ld.so.1: perl: fatal: relocation error: file /usr/perl5/site_perl/5.8.4/sun4-solaris-64int/auto/TamarLog/TamarLog.so: symbol __1c2n6FI_pv_: referenced symbol not found
Killed