Accessing $msginfo structure

Alex Regan mysqlstudent at
Sat Feb 28 23:02:44 CET 2015


On 02/27/2015 06:43 AM, Michael Storz wrote:
> Am 2015-02-25 04:25, schrieb Alex Regan:
>> Hi,
>> I'm using amavisd-new-2.9.1 on fedora20 and implementing the custom
>> hooks to record info about each message to syslog.
>> I successfully have it reporting things like the quarantine file name,
>> sender/recipient, etc, but having trouble with printing the
>> $msginfo->virusnames variable. I'm more-or-less a perl novice.
>> After having established the variable is defined, when I try to print
>> $msginfo->virusnames, it instead prints ARRAY(0x9813058).
>>         my($loc_virus)  = $msginfo->virusnames;
>> If I try to access it as an array, it just produces an error:
>>         my($loc_virus) = join(", ",@$msginfo->virusnames);
> Try
>           my($loc_virus) = join(", ",@{$msginfo->virusnames});

That fixed it. I assume that causes the interpreter to evaluate the 
$msginfo->virusnames before referencing it in the array?

Thanks so much.

More information about the amavis-users mailing list