How about $_[0] = eval "*".caller."::G".(0+\$_[0]) unless ref $_[0] eq "GLOB" or ref \$_[0] eq "GLOB"; before the call to $open? This prevents the call to the standard open to autovivify a GLOB when none is available.
In reply to Re^3: Track open file handles
by Eily
in thread Track open file handles
by shmem
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |