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
In reply to Re: Ghostly subroutine variables haunting me in subsequent calls
by blazar
in thread Ghostly subroutine variables haunting me in subsequent calls
by moonunit
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |