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


in reply to Re^3: Sorting integer value hash keys
in thread Sorting integer value hash keys

You're missing a newline on the last line.
I think that you're mistaken—say (as opposed to print) provides it for me.
Furthermore, since you assume the list is constant, that can be simplified to
say for sort { $a <=> $b } 1..10;
Yes, you're right; I contemplated coming back and updating the node with that, but then I would have had to point out that sort { $a <=> $b } 1..10 could be replaced by just 1..10, and that seemed to be going too far. :-)
And if you wanted to show that stringification doesn't matter
That wasn't my goal, largely because I'm not sure what you mean. UPDATE: Because I was too busy writing one-liners to read the OP's actual question; sorry.