BEGIN { *CORE::GLOBAL::open = sub { warn "Captured: " . $_[1]; open $_[0], $_[1] }; }