in reply to Can't get Tie::File working

Try using the 'recsep' parameter when tieing the file, as in
tie @content, 'Tie::File', $filename, recsep => "\n";

Replies are listed 'Best First'.
Re^2: Can't get Tie::File working
by rovf (Priest) on Oct 14, 2008 at 12:32 UTC
    Try using the 'recsep' parameter

    I tried this and this works (though, as a have explained in my reply to Corion, I still don't quite understand why it is necessary, since I didn't have to care about line endings when processing files in the "normal" way). Of course now I have the problem that I first need to find out what line ending style the file has before being able to tie it. Maybe it's in my case better to read the file manually into the array instead of using Tie::File, as I don't want to change anyway.

    -- 
    Ronald Fischer <ynnor@mm.st>