$#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...
In reply to Re^2: Can't get Tie::File working
by rovf
in thread Can't get Tie::File working
by rovf
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |