I am setting the name server used by the resolver with Net::DNS
my $resolver = Net::DNS::Resolver->new();
$resolver->nameservers( $somenameserver );
If the argument is wrong, an error is printed on standard error. E.g.,
unresolvable name: uuu.aaa.eee at check_rbl line 145.
and the functions returns 0, if everything is OK then 1 is returned.
So far, so good.
I would like to suppress the error message on standard error and perform a custom action.
How can I avoid the automatic error message? And how I get the error message?