[Canberra-pm] Recursion in Perl
Andrew Pollock
andrew-pm at andrew.net.au
Wed May 24 17:53:57 PDT 2006
My turn to ask a question.
(Disclaimer: recursion does my head in at the best of times)
I'm trying to walk through a bunch a config files to build up a data
structure that represents the inclusion relationships between them.
So at the moment, as I prototype this, I've got a subroutine that will call
itself again on a file if it hasn't already seen it, and see what includes
it mentions, and then call itself again on them.
What I seem to be encountering is a bunch of "readline() on closed
filehandle" errors, so I'm wondering if the filehandle namespace isn't
unique to each call of the subroutine, and I'm closing it in a subsequent
invokation, or I've caused my brain to explode in another more subtle
manner.
regards
Andrew
More information about the Canberra-pm
mailing list