note demerphq <p> Umm, what is it you think that the package statement does in this code? </p> <p> Because I'm hard pressed to think of anything that it might affect in the code you have posted. The vars are all lexical. So they arent modified at all by the package declaration. </p> <p> And actually your language is imprecise. Packages arent containers really. Not in the sense you state. Package statements are instead merely hints to the compiler as to how to deal with non-fully qualified identifiers. Subs dont run "in a package" they are compile time bound to specific lexical and global variables, which may be affected by the presence of a package statement, and indeed unqualfied sub declarations are installed in the stash relative to the current package, but other than that, well, packages dont exist. Not as a first order concept or object. </p> <p> So what *exactly* is the problem you are trying to solve? This has all the hallmarks of an XY question. </p> <p> update: after discussing on #p5p it was suggested that maybe you want to do this so as to not confuse Carp::carp or Carp::croak. If so then, well, those routines are arguably broken. Dont use them, possibly by changing them to cluck/confess and the problem goes away. </p> <div class="pmsig"><div class="pmsig-108447"> ---<br /> $world=~s/war/peace/g<br /> <br /> </div></div> 771388 771388