in reply to Is it a filehandle or a obj refference?

$INDEXFILE is a lexical variable, and you're not returning that lexical variable but a reference to the global glob referenced by the string version of $INDEXFILE. That's most likely not what you want. Just return $INDEXFILE instead.

Of course, it would have helped us help you better if you had shown us the actual error message you got.

Replies are listed 'Best First'.
Re^2: Is it a filehandle or a obj refference?
by Bloodnok (Vicar) on Mar 27, 2009 at 10:53 UTC
    I think the OP did contain the actual error, Corion ... it's just that, since it was unformatted, it isn't easy to spot - it's the line noise beginning at Can't call method "commit"....

    A user level that continues to overstate my experience :-))