🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.perl
Article #52136

Re: %hash = (a => 1, b => 2, a => 3)

#52136
From: Maciej Misiak
Date: Sun, 26 Dec 2010 13:30
25 lines
1728 bytes
W dniu 2010-12-26 12:39, Stachu 'Dozzie' K. pisze:
> Damn, chłopaki, wspomóżcie. W którym perldocu jest wpisane, że przy
> inicjalizacji hasza listą, jeśli klucz się powtórzy, brana jest wartość
> z ostatniego powtórzenia? Znaczy, z kodu poniżej wyjdzie liczba 3:
> #v+
> %hash = (
>    a =>  1,
>    b =>  2,
>    a =>  3,
> );
> print $hash{a};
> #v-
>
> Że tak jest, to łatwo sprawdzić, ale mnie interesuje gwarancja
> pochodząca z dokumentacji, a jakoś nie mogę tego znaleźć (perldata,
> perldsc, perlfaq).

Ja widzę tylko w perldata zdanie:
'Note that just because a hash is initialized in that order doesn't mean 
that it comes out in that order.'

ale nic konkretniejszego nie mogę znaleźć.

-- 
grizzley
Technical Details
Message-ID: <if7g20$trq$1@news.onet.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.rmf.pl!agh.edu.pl!news.agh.edu.pl!news.onet.pl!.POSTED!not-for-mail
References: <if79hi$bnf$1@solani.org>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.rmf.pl!agh.edu.pl!news.agh.edu.pl!news.onet.pl!.POSTED!not-for-mail
From: Maciej Misiak <grizzley@poczta.onet.pl>
Newsgroups: pl.comp.lang.perl
Subject: Re: %hash = (a => 1, b => 2, a => 3)
Date: Sun, 26 Dec 2010 14:30:33 +0100
Organization: http://onet.pl
Lines: 25
Message-ID: <if7g20$trq$1@news.onet.pl>
References: <if79hi$bnf$1@solani.org>
NNTP-Posting-Host: ip-62-69-199-251.globalconnect.pl
Mime-Version: 1.0
X-Trace: news.onet.pl 1293370240 30586 62.69.199.251 (26 Dec 2010 13:30:40 GMT)
X-Complaints-To: niusy@onet.pl
NNTP-Posting-Date: Sun, 26 Dec 2010 13:30:40 +0000 (UTC)
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 ThunderBrowse/3.3.4
In-Reply-To: <if79hi$bnf$1@solani.org>
X-Antivirus: avast! (VPS 101226-0, 2010-12-26), Outbound message
X-Antivirus-Status: Clean
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit