Hi,
I have updated the posted message.in my actual code I have tested the $! & $? exactly after the backtricks call. You can check the post now.It is corrected exactly as per my original code.
Actually I did mistake when I posted message.Your diagnosis is right according to previous post. Now updated post is exact replica of my code.Now you can check my updated post to start anlysis. In my orginal code I checked $? & $! just after backtricks as per the updated in the post.