The each() function is used to retrieve the next key/ value pair from a hash if its used in a list context
, if called in a scalar context only the next key of the hash is retreived.
In the above example using the each() function every time in a loop a key, value pair is fetched and
displayed. As you can see that the pairs returned are random and not in the same order as they are in a hash.
A Note
Simple introduction, basic CGI perl programming codes with examples.
Do send your feedback or suggestions on this tutorial.
This is a copyright content.