[Linux-disciples] perl question: why do modules return a reference to a hash and not a hash?

Stephen R Laniel steve at laniels.org
Thu Dec 22 13:40:44 EST 2005


On Thu, Dec 22, 2005 at 01:39:07PM -0500, Stephen R Laniel wrote:
> For some kind of proof that a hash is an array, you can run

I guess that's not really proof, because it could be the
case that the 'join' operator treats hashes differently than
it treats arrays. But I'm fairly certain that the only two
contexts that Perl functions treat differently are scalar
and array context. Everything else is one of those two: a
reference is a scalar, a hash is an array, I'm pretty sure a
filehandle is a scalar, etc.

-- 
Stephen R. Laniel
steve at laniels.org
+(617) 308-5571
http://laniels.org/
PGP key: http://laniels.org/slaniel.key
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.bostoncoop.net/pipermail/linux-disciples/attachments/20051222/1dbcacef/attachment.pgp


More information about the Linux-disciples mailing list