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]