in reply to handling different new line characters

"..if you see a blatent flaw in my logic.."

Not a flaw in your logic per se, but more a comment on the way you are opening your files.
It is generally accepted that the three argument form of open is a better choice. That is, instead of doing:

open (FH, "< $parent_index") or die "could not open file $parent_inde +x for reading:$!";
..you do:
open (FH, '<', $parent_index) or die "could not open file $parent_ind +ex for reading:$!";

The main advantage of this is that it separates the mode from the filename, thereby avoiding any confusion between the two (ie. what if the filename begins with "<" ?). It also forces you to be explicit about which mode you want - again avoiding any possible confusion.

And if you are using Perl 5.8.0+, you can even do:

open (my $fh, '<', $parent_index) or die "could not open file $parent +_index for reading:$!";

See the documentation for open for further reading, and this topic is also covered quite well in Intermediate Perl, if you happen to have a copy.

Hope this helps,
Darren :)