[tpm] dereferencing arrays

Richard Dice rdice at pobox.com
Fri Jun 27 07:27:41 PDT 2008

> So the docs say pass in a reference to an array (containing the list)
> @list = ['', ''];
> Net::SMTP->new(\@list, ...);


I haven't looked at the docs for Net::SMTP, but this just looks weird to me.

What you're creating within @list is an array wherein the 0-th element is
itself a listref.

Then, you pass a _reference_ to this list?

I would think that what you'd want is...

@list = ('', '');
Net::SMTP->new(\@list, ...);

I.e. if Net::SMTP wants a listref, it probably doesn't want a double

 - Richard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.pm.org/pipermail/toronto-pm/attachments/20080627/4ca7f9f4/attachment.html 

More information about the toronto-pm mailing list