Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I am going to have a NEXT and LAST link which will be a link that looks like $script.pl?img=100. Now if we were on image 100, the LAST would be 99 and the NEXT would be 101.
Some images will be removed which means image 101 might not be there anymore. I need to find a way to make it loop until it finds the NEXT available key backwards and forwards with missing ones in mind. In this example, if we were on image 100 and 101 was missing, it'd check to see if 102 existed, and 103..
On the same token, how would I determine if a key is the last one I have? Say there's 500 images, how would I check to make sure image 500 has no images after?
Thank you for your wisdom
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: finding next key in db_file
by bobf (Monsignor) on Aug 16, 2006 at 04:12 UTC | |
by sulfericacid (Deacon) on Aug 16, 2006 at 04:29 UTC | |
by bobf (Monsignor) on Aug 16, 2006 at 04:55 UTC | |
by sulfericacid (Deacon) on Aug 16, 2006 at 05:04 UTC | |
Re: finding next key in db_file
by ikegami (Patriarch) on Aug 16, 2006 at 05:20 UTC |