in reply to Re^5: Problems with Hash Keys and Spaces
in thread Problems with Hash Keys and Spaces

Unix
  • Comment on Re^6: Problems with Hash Keys and Spaces

Replies are listed 'Best First'.
Re^7: Problems with Hash Keys and Spaces
by FunkyMonk (Bishop) on Aug 08, 2008 at 17:46 UTC
    Did the data in the array originate on Windows, and you chomped it? That would leave a chr 13 at the end of the string. Add
    $Data::Dumper::Useqq = 1;

    Just before the print Dumper.... If, as I suspect, it shows that $temp[1] really contains "Test MMA\r", you can use

    $temp[1] =~ s/\r//;

    to cleanse it.


    Unless I state otherwise, all my code runs with strict and warnings
      That is exactly it. I created a text file in windows, had it read into an array and chomped it. I will see if your solution works. Thanks!
        It worked! Thanks again. How did you go about figuring this out?