> I've certainly written plenty of "selection" loops to determine the > smallest or largest item in a group. That's "top 1". FWIW. I think this is not unusual nor are top N. The only thing is the later is IMO more often written like @array=(sort @foo)[0..9]; And not like ($one,$two,$three)=sort @foo; As for anything more than a few elements the latter style is a real pain. Dunno if this is an important consideration but I thought I'd point it out. So I would say that this optimization is a worthy endeavour. But that's just me. BTW, I suspect that this stuff isnt done much in modules but is done a lot in application code. At least that's where I do it. Cheers and thanks for the interesting reading and debate, Yves