Please insert some <CODE> tags around that, and eyeball it in the preview window before submitting—your code is all flowed into a paragraph (see Site How To).
IAC, print out the value of $cmdline just before making the call to make sure it's as you think it should be.