http://www.perlmonks.org?node_id=378274


in reply to Overloaded *CORE:: function not behaving correctly

You have to override *CORE::GLOBAL:: functions at compile-time so when the parser sees them they're pointing to the right bit of code e.g
BEGIN { *CORE::GLOBAL::glob = sub { "glob overriden" }; } print glob('a pattern'), "\n"; *CORE::GLOBAL::join = sub { print "n/a" }; print join(' ', qw/ join not overridden /), "\n"; __output__ glob overriden join not overridden
HTH

_________
broquaint