I have to say thank you very much. You pointed to the right direction. By adding the " at the begging and ending of the url solved the problem. One of those days when you can't see what is right in front of you.
Thank you again!!!!!
But then you did not read the second part of my message... What if you variable contains a " that will break your script again. Go use either CGI.pm you Apache::Util to do your job.