in reply to Re: Strange read file behaviour
in thread Strange read file behaviour

Thank you all for reply.
open DIRECTORIES, "<:crlf", $source or die $!;
solved the problem.
In effect I'm testing a cross platform code.

Replies are listed 'Best First'.
Re^4: Strange read file behaviour
by ikegami (Patriarch) on Jun 28, 2010 at 15:37 UTC
    Alternative:
    open DIRECTORIES, "<", $source or die $!; while (<DIRECTORIES>) { s/\s+\z//; # Remove trailing whitespace, incl \r and \n ... }