Thanx for the help.. it turns out that wasn't even my problem.
I am using a stupid older version of the module (which probably didn't
work).

-----Original Message-----
From: Jeff 'japhy' Pinyan [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 12, 2002 4:21 PM
To: Nikola Janceski
Cc: '[EMAIL PROTECTED]'
Subject: Re: Anonymous hash question


On Feb 12, Nikola Janceski said:

>I am using a module function (method) that requires an anonymous hash as
the
>first parameter.

No, it requires a hash reference.

>ie. $sender->OpenMultipart({from => $FORM{'from'}, to => $FORM{'to'}, cc =>
>$FORM{'cc'},
>                       subject => $FORM{'subject'} } ) || die
>"$Mail::Sender::Error\n";

{ a => 1, b => 2 } is a reference to an anonymous hash.  \%foo is a
reference to a (named) hash.

>my %TEMP;
>foreach $key ( qw( from to cc subject ) ){
>       $TEMP{$key} = $FORM{$key} if $FORM{$key}
>       }
>
>$sender->OpenMultipart( { %TEMP } ) || die "$Mail::Sender::Error\n";

You can say \%TEMP here instead of { %TEMP }.

-- 
Jeff "japhy" Pinyan      [EMAIL PROTECTED]      http://www.pobox.com/~japhy/
RPI Acacia brother #734   http://www.perlmonks.org/   http://www.cpan.org/
** Look for "Regular Expressions in Perl" published by Manning, in 2002 **
<stu> what does y/// stand for?  <tenderpuss> why, yansliterate of course.
[  I'm looking for programming work.  If you like my work, let me know.  ]


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

----------------------------------------------------------------------------
--------------------
The views and opinions expressed in this email message are the sender's
own, and do not necessarily represent the views and opinions of Summit
Systems Inc.


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to