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
Post a Comment