in reply to Recursive file opening: reading an undef at the end of file

You never assign $mode. What is it supposed to be for? You also never use the 2nd argument to read_cal

Your test for /^\s*$/ is redundant, because you've already removed all whitespace, and you test for an empty line.

I think your main problem is that you should have a next after the recursive call, or put the rest of the stuff in an else. You don't want to read a file and parse the line, do you?


The PerlMonk tr/// Advocate

Replies are listed 'Best First'.
Re: Re: Recursive file opening: reading an undef at the end of file
by thor (Priest) on Dec 23, 2003 at 20:17 UTC
    As for mode not being set...while unfortunate, that wasn't causing the problem (though it did cause incorrect results). The next after the recursive call did it though. Sometimes a guy just needs a second set of eyes. Thanks!

    thor