Thanks for elaborating. Unfortunately the only extra information here about what actually goes wrong is this bit:
but, server is not throwing any error and result
which isn't very clear because while it says what doesn't happen, it fails to mention what does actually happen. Does the script hang? Does it die? Does it silently finish? What did you do to try to find the root cause? Have you been through the Basic debugging checklist?
My system details Windows, ActiveState Perl 4.14.
That's an almost unfeasibly old version of perl and certainly the code which you have posted would not even compile on such an ancient version. Did you mean 5.14 instead?