in reply to Finding out how you were called...

Have a look at the FindBin module.
It will give you the called program or the real program with all links resolved.