in reply to Ghostly subroutine variables haunting me in subsequent calls
Whatever problem you're really experiencing, it seems hard to believe that "this routine works the first time". Indeed it would be sensible to at least post code that compiles. What do you mean that @/@ to really be?!?sub complete_inchi_parse { my $inchi = shift; my @inchibits = split(@/@,$inchi);
More on topic wrt your actual question, I see that you both push into a @pileofinchis variable that's not lexically scoped to your sub and return a reference to it. There's something strange in this modus operandi. I would probably gather a "local" @pile and return it, pushing the return value of this sub into a suitably "global" @pileofinchis.
HTH
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Ghostly subroutine variables haunting me in subsequent calls
by moonunit (Initiate) on Oct 26, 2005 at 11:57 UTC | |
by blazar (Canon) on Oct 26, 2005 at 12:07 UTC |