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


in reply to assigning the maximum of two numbers

Edit: Sorry, I misread the question entirely.

I would probably go with the ternary for readability in most cases, but if you're doing this in a critical part of your application, it looks like sort/shift is optimized well. Neat.
  • Comment on Re: assigning the maximum of two numbers