in reply to Re^2: problem path stored in hash
in thread problem path stored in hash

I tried your code and the returned hash was:
workingDir /root/working/ mapFile test.map inputFile test.in
which looks fine to me. One possibility is that you night have a "\r" in the data (did the config file come from Windows?) or in a print statement instead of a "\n".

Update: It is possible to reproduce yur problem with a "\r" appended to the WORKING_DIR in your config file.

Replies are listed 'Best First'.
Re^4: problem path stored in hash
by awsiv (Initiate) on Jun 25, 2010 at 11:02 UTC
    Hi, thanks a lot.It really is the '\r'!, I copied the file from windows to linux VM .

    chomp() or chop() didn't remove it. now i'm using regex.
    Cheers!
      If you want chomp to remove the "\r" then:
      local $/ = "\r\n";
      in your subroutine before you read the config file. chop only removes the last character, regardless of what it is.