in reply to Re^2: ARGV array getting shifted
in thread ARGV array getting shifted
One PM has a filehandle read, but can this be shifting it just by being included in a "use"?It can and it will if you use the while (<>) construct directly in the main block of your module or in a subroutine that gets called by the main block.
Keep in mind that use Module; actually runs all the code in that module immediately. Unless you're doing something clever, like setting up the module's interface, it's bad form to have arbitrary code in a module. Normally, a module should only set up an API, not run all kinds of code immediately.
|
|---|