Re: Use of hash variables in module call - puzzling behaviour

Henry Law <news@xxxxxxxxxxxxx> wrote:
> Anno Siegel wrote:
> > Swap the "Sending with G_server variables" and "Sending with g_server
> > variables" blocks. It could be the second call that fails instead of
> > depending on which hash is used. Perhaps one of the objects involved
> > ($mail or $header) is damaged after the first use.

> I had already tried that; it's the $g_server version that fails
> consistently.

That would have been my first recommendation. Second would be to abstract
away the repeated code, just to make sure there is not some subtle (or
invisible funky character) difference in the code which executes under the
two hashes.

foreach my $hashref (\%g_server, \%G_server) {
# etc.
@recipients = $mail->smtpsend(Host=>$hashref->{smtpserver},
# etc.


-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service $9.95/Month 30GB