[28967] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 210 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Mar 9 14:23:17 2007

Date: Fri, 9 Mar 2007 11:09:06 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Fri, 9 Mar 2007     Volume: 11 Number: 210

Today's topics:
    Re: ${{ foo => bar, baz => faz }}{ baz } <bik.mido@tiscalinet.it>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Fri, 09 Mar 2007 18:19:15 +0100
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: ${{ foo => bar, baz => faz }}{ baz }
Message-Id: <ra53v2ls6nd9eamrdf0m2s3ck15gp34opv@4ax.com>

On Fri, 09 Mar 2007 10:15:11 -0500, Uri Guttman <uri@stemsystems.com>
wrote:

>  MD> may actually mean two different things and Perl choose the IMHO less
>  MD> intuitive one. But maybe it was the most intuitive one when it was
>  MD> introduced.
>
>that is a case of backward compatibility with perl4. multiple hash keys
>in scalar context was used as a pseudo multilevel hash in perl4 (keys
>are joined with $; into a single key. works if no key has $; inside

That's what I meant.

>it). this still is the case in perl5 but is rarely used. the problem

But in Perl 4 there were no references. When references were
introduced,

  $href->{'foo','bar'};    # may have meant either
  ${ $href }{'foo,'bar'};  # or
  @{ $href }{'foo,'bar'};

and they chose the former.

Incidentally, reasoning on these issues makes me realize that although
the $ => singular, @ => plural metaphor has some appeal, Perl 6's
approach is saner.

>with making it truly a slice is the multilevel problem. you can slice at
>the bottom most level with no problem but what does it mean at higher
>levels? you would need to create a deep data structure on the fly and it
>couldn't be used for anything but returning it (via a ref). perl6 does

Hmmm, sounds like a convincing explanation. Hadn't tought of that, of
course.


Michele
-- 
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
 .'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,


------------------------------

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc.  For subscription or unsubscription requests, send
#the single line:
#
#	subscribe perl-users
#or:
#	unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.  

NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice. 

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.

#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V11 Issue 210
**************************************


home help back first fref pref prev next nref lref last post