Re: seeking golfing advice

[email protected] (John Douglas Porter) Fri, 18 May 2012 06:17:47 -0700 (PDT)
Newsgroups perl.fwp
Message-ID <[email protected]>
=0A=0A> From: Aristotle Pagaltzis <[email protected]>=0A> Subject: Re: seeki=
ng golfing advice=0A> To: [email protected]=0A> Date: Friday, May 18, 2012, 5:29=
 AM=0A> * Steve Fink <[email protected]>=0A> [2012-05-18 10:25]:=0A> > On Th=
u, May 17, 2012 at 3:14 AM, Aristotle Pagaltzis=0A> <[email protected]>=0A> =
wrote:=0A> > > * Mike Erickson <[email protected]>=0A> [2012-05-16 15:45]:=
=0A> > > > If you don't care about order, but just want=0A> those elements,=
 you=0A> > > > can also do:=0A> > > >=0A> > > > keys%{{@a}}=0A> > >=0A> > >=
 There is more than order that gets lost. If you=0A> use `keys` you also=0A=
> > > get everything back stringified =E2=80=93 undefs are=0A> lost and ref=
erences=0A> > > break. If you use `values` these problems go=0A> away=E2=80=
=A6 except that to=0A> > > get the odd-index elements from it you have to=
=0A> `reverse` the array,=0A> > > at which point a not-especially-golfed gr=
ep is=0A> shorter.=0A> >=0A> > So you'd want=0A> >=0A> >=C2=A0 values%{{1,@=
a}}=0A> >=0A> > then=0A> =0A> D=E2=80=99oh!=0A=0A=0AD::oh is right.  You ge=
t an unwanted extra undef at the end of such list.=0A=0A