in reply to Issue with read a file

Would love to help.

Need to see some kind of code to even have a decent guess.

So, my random thought for the day: Is there any chance you are forgetting to close the file(s) after you read it/them and Perl is getting confused in some way?

Otherwise, will need to see something. Can't imagine what you've done wrong if we don't know what you've done.

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