So, using push and shift you used standard arrays to hold data items... You now want to assign, for want of a better phrase, a priority field to each item in your queue? Would using a hash with the priority as the key value work for you?<br><br>For example:<br><FONT FACE=monospace><br>$Queue{'1'} = "Most important item";<br>$Queue{'2'} = "A less important item";<br>$Queue{'100'} = "Bottom of the heap whatever else happens";<br></font><br><br>It should be fairly easy to create some function to insert/delete items from the queue, possibly re-numbering (re-keying) displaced queue items. (Careful though, I've got a reputation for saying "It should be fairly easy..." just before a few days of head scratching... ;^) <p> <br><a href=mailto: > </a><br><a href= > </a><br>--<br>
0 1 - Just my two bits