Get return value from PERL script calling from KSH

All:
I am calling a PERL script from KSH. I need specific codes to be returned by the PERL Script.
For ex:
Ksh
-----

result=`test.pl $FILE`


My idea is to get the value of result from the test.pl, by specifically making the test.pl to print the return code. Since I had some other print statements, my result is getting messed up and resulting some other earlier printouts in addition to my desired output. Any help how to get over the problem? Please help

perldoc -f exit or exit - perldoc.perl.org