Step through Hash Keys forward and backward 
Author Message
 Step through Hash Keys forward and backward

Hi,

I have a hash problem to solve and wonder if anyone knows the solution.

Is it possible to step through each hash element without using "foreach " ?
I am looking for something like a database cursor where you can position at
a particular hash key, and can do forward and backward.

Any help welcome.

Thanks,

Tony.



Wed, 10 Sep 2003 10:38:50 GMT  
 Step through Hash Keys forward and backward

them in any order you'd like.

- Pat

Quote:

> Hi,

> I have a hash problem to solve and wonder if anyone knows the solution.

> Is it possible to step through each hash element without using "foreach " ?
> I am looking for something like a database cursor where you can position at
> a particular hash key, and can do forward and backward.

> Any help welcome.

> Thanks,

> Tony.



Thu, 11 Sep 2003 22:03:01 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. baby steps with complex hashes of hashes of hashes of arrays

2. split composite hash key into sub key fields.

3. hash keys order returned by keys() reproducible ?

4. hash from split in one step

5. exists() on sub-hash creates a key in super-hash

6. Sorting array of hash references by a hash key

7. complex foreach loop with deep hashes (sorted hash slices (using an array for keys))

8. Sort non-key in a Hash of Hash

9. Access a hash key by hash value ?

10. explain an hash assignment: $hash{'key'}++

11. dynamically creating a hash of hashes, reading keys/values from a file

12. exists() on sub-hash creates a key in super-hash

 

 
Powered by phpBB® Forum Software