Accessing $msginfo structure
Michael Storz
Michael.Storz at lrz.de
Fri Feb 27 12:43:07 CET 2015
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});
Michael
More information about the amavis-users
mailing list