redirect STDERR of eval to /dev/null in perl -


eval {require $testrequirepath}; 

while running above, if there syntax error in $testrequirepath file, prints stdout. want redirect /dev/null. how can it?

what seeing warning, not error; errors captured eval , placed in $@. suppress warnings also, can do:

eval { local $sig{__warn__} = sub {}; require $testrequirepath } 

Comments

Popular posts from this blog

ruby on rails - RuntimeError: Circular dependency detected while autoloading constant - ActiveAdmin.register Role -

c++ - OpenMP unpredictable overhead -

javascript - Wordpress slider, not displayed 100% width -