Thanks,but this is just a small part of my program,I need to get the values exactly like they are or I will need to change other parts of the program. I need to know why they don't match, because they look the same! Even with chomp the code doesn't work(I have already checked if the cmdline has newlines, but it doesn't)!
You think that if I remove the null character(\0) in all elements of @CMD, it will work?