$ perl -e 'BEGIN { *CORE::GLOBAL::system = sub { print "hello $_[0]\n" } } system "foo"' hello foo