in reply to Re: printing last 100 keys from hash
in thread printing last 100 keys from hash

Why would this work when I use -10 .. -1 then? This works fine showing the latest 10 posts in the other script and the code is exactly the same except the numbers.

I tried for (grep defined($_), (sort keys %db)[-100 .. -1]) { like someone suggested and instead of printing 100 messages that don't change, it doesn't print anything.

Are there any modules that will make hashes use insertion order that comes with the Perl package? Or would I have to go out and install one?