in reply to Re: sub running on use statement
in thread sub running on use statement

Yes, that's what I have in the module. Quite a few, actually.

The sub-routine that I noticed this printing on is recursive, calling itself to fill an array with all the files in a directory tree. When that recursive subroutine was called from another module, it printed when I didn't expect it.

One of the scalars passed by reference to that recursive subroutine is the parent directory to search. I'd inserted a print statement just after the references were taken from "$_" to confirm that the parent directory was correct.