i think i figured it out why i always get an error. the config file is written on a win32 box, and as i was told right now there is more than just \n at the end of the line, there is also a \r there, so i have to get rid of this also...
Comment on Re: problems with reading data from cfg file
chomp will remove only the newlines based on the current value of $\ which is the OUTPUT_RECORD_SEPARATOR (in English)
If the file was written on win32 (where $\ defaults to \n\r) and then uploaded to unix (where $\ defaults to \n), chomp only catches the \n and misses the \r.