use subs 'select'; sub select { my ($fh) = @_; warn "inside my custom select\n"; CORE::select $fh; } select STDERR; print "Hello to STDERR!\n"; select STDOUT;