mpapec's alternative parsing is much better than your current script. But, for what it's worth, your original problem is that the result of the backtick operator includes the newline character at the end of the string.
You can remove it with chomp, eg:
my $DEST_PATH=`grep relogin_logs $file_cnf | cut -d "=" -f2`;
chomp $DESTDIR;
Do this with the result of all your backtick commands.