http://www.perlmonks.org?node_id=319069


in reply to Re: Re: Re: Sorting by date
in thread Sorting by date

This is very interesting, though I can certainly admit I've always been afraid of looking into MAP and SORT (just the way it looks so complicated makes me cringe). One thing after looking over this a number of times that I still don't get is... You are taking an array and putting only the date inside, right? This seems to be what the original poster wanted anyway, but with mapping how are you supposed to draw back the rest of the %list's values?
A => '1.13.04:Record:A', B => '1.12.04:Record:B', C => '3.13.04:Record:C', D => '3.13.02:Record:D',
You are stripping apart the date into $_->[1], how would you find the Record or the letter afterwards? Let's say $_->[1] is 1.12.04 this time. How would you find Record and B and take that with it so you can use it later? Or is that data lost and only the date can be retrieved after you've mapped?

At this level of confusion, unless this question makes sense and can be answered without digging the hole any deeper, even attempting a project which requires mapping or sorting like this is just not likely to happen in the near future.

Thanks for your time, everyone.



"Age is nothing more than an inaccurate number bestowed upon us at birth as just another means for others to judge and classify us"

sulfericacid