Finally i found the bug..
I had committed a mistake while associating the .pl files with the perl.exe
I had used the following command before
So the problem was that, the perl.exe would always get only the file name as the argument (%1) and all other arguments were ignored.
So now i've changed it to
So now thw %* accepts all the arguments passed to the perl.exe
I thank you for your efforts in helping me in my problems.