in reply to Re^3: Fastest way to sort a list of integers into 0,1,2,3,-3,-2,-1
in thread Fastest way to sort a list of integers into 0,1,2,3,-3,-2,-1

Oh right. It would be

@list = map { unpack 'j>', $_ } sort map { pack 'j>', $_ } @list;

I knew I was tired and missing something.

  • Comment on Re^4: Fastest way to sort a list of integers into 0,1,2,3,-3,-2,-1
  • Download Code