in reply to Re: Can't get Tie::File working
in thread Can't get Tie::File working
$#content will return index of the last element in the array
OK, this explains the second half of the problem. But why do I get "the whole file" slurped into $content[0]? I had expected that each line in the file is one line in the array.
Could it have to do with line endings? The file is a Unix-Style file (\n separated), but the program is running on Windows (ActiveState Perl). But OTOH, the usual operations to read files (open() etc.) don't seem to have a problem with the different line endings...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Can't get Tie::File working
by Corion (Patriarch) on Oct 14, 2008 at 11:45 UTC | |
by rovf (Priest) on Oct 14, 2008 at 12:10 UTC | |
by Corion (Patriarch) on Oct 14, 2008 at 12:29 UTC |