Not only is that code way too long to find your alleged bug, but it doesn't shift() @ARGV at all. There isn't even any mention of shift() or @ARGV.
Which may be the reason why it's a "mystery" about which he's asking here. One remote possibility is that the thing is done in a module he's using. I doubt that so much that I wouldn't believe it even if I were seeing it!
In reply to Re^3: ARGV array getting shifted
by blazar
in thread ARGV array getting shifted
by nbhar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |