my $s = do { # don't care about warnings. local *STDERR; open STDERR, '>', File::Spec->devnull(); code_that_warns_deep_in_core_perl(); # and I can't figure out why };