Use absolute paths, as in -l/full/path/to/some/libmpi.so and make sure the file appears when you do make (in what you've posted, the file doesn't appear).
Thanks Guys but this didn't work.
(sorry for the late reply I have been overseas)
I have decided to give up on perl and re-write the MPI stuff in c.
Thanks for your assistance..