in reply to Re: Issue with read a file
in thread Issue with read a file

I understand..thanks. I found the issue but I still do not have a solution. When reading the text files, one of the file I read in a string (by setting undef $/). Therefore when I go the next file and want to read it line by line, I am getting the issue. Now I am doing a $/='\n'; before I read the next file line by line. But this is not helping. The file is being read in one line. Any clues why? Thanks

Replies are listed 'Best First'.
Re^3: Issue with read a file
by choroba (Cardinal) on Sep 12, 2013 at 16:47 UTC
    Use double quotes. Single quotes do not interpolate. Or even better, set $/ locally.
    لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ
      Thanks everyone! The following worked: $whole_file = do { local $/; <FILE> };