#!/usr/bin/perl use strict; use warnings; package foo; sub fake_ARGV { print "in foo::ARGV\n" } no warnings "once"; *foo::ARGV = *foo::fake_ARGV; package main; foo->ARGV; print $ARGV[0]; #### ~/sandbox$ perl test.pl 'Still here' in foo::ARGV Still here