in reply to Text file opening problem

Maybe the file or directory doesn't exist? Are you sure that the file is in the directory you think it is and that the script has permission to access it?

As an aside, always use the three parameter version of open and use lexical file handles (you do use strictures - doc://strict]; use warnings; don't you). Your file open code should look like:

open my $inFile, '<', "datebook.txt" or die "Can't open datebook.txt: +$!\n";

Is the fact that your die mentions datebook but the open is on datebook.txt a typo or a bug?

True laziness is hard work