$ perl -le 'BEGIN { *CORE::GLOBAL::readpipe = sub { print "hello $_[0]" } } readpipe "foo"; `bar` ' hello foo