in reply to printing last 100 keys from hash
.. only works in ascending order, so you need to replace it with reverse -100 .. -1. But ...
The order of the data returned by keys is effectively random. So all that will give you is an unpredictable selection of 100 keys from the hash.
If you want the last 100 keys to be created or updated, then you're going to need to use some variety of tied hash. I suggest looking at Tie::InsertOrderHash and Tie::Hash::Indexed.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: printing last 100 keys from hash
by Anonymous Monk on May 21, 2004 at 15:45 UTC | |
|
Re: Re: printing last 100 keys from hash
by Anonymous Monk on May 21, 2004 at 16:12 UTC |