Schwartzian transform

Abigail abigail at abigail.be
Wed Aug 13 10:45:28 BST 2014


On Wed, Aug 13, 2014 at 10:33:50AM +0100, Dermot wrote:
> Hi
> 
> Sorry for the OT post :)
> 
> I am trying to transform the hash reference below so that the value of
> position is ordered from 1..4. The sorting works but I can't seem to modify
> the value of {position} inline. To achieve what I want I have to look
> through the @sorted array. I'd like to golf this if I can but I've hit a
> wall.
> 


If I run your program, the final Dump shows that 'position' has been
modified. Where you started off with positions 0, 1, 2, and 5, you
ended with positions 1, 2, 3, 4.

But perhaps I misunderstood your question?


Abigail


More information about the london.pm mailing list