Re: hash matching

Michael Storz <[email protected]>
Newsgroups gmane.mail.virus.amavis.user
Message-ID <[email protected]>
Am 2020-05-20 14:38, schrieb Matus UHLAR - fantomas:
> Hello,
> 
> I encountered this case where hash matching did not work properly:
> 
> default:
> 
>  @spam_lovers_maps = (
>    \%spam_lovers, \@spam_lovers_acl, \$spam_lovers_re);
> 
> # DOES NOT work, no idea why
> %spam_lovers = {
>       'archive@xxx'    => 1
> };
> 
> # DOES work
> @spam_lovers_acl = ( 'archive@xxx' );
> 
> where can the error be? did I fill bad values for %spam_lovers?

You are assigning a hashref instead of a hash. Use

%spam_lovers = (
       'archive@xxx'    => 1
);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.