Thank you for your input. This was just an exercise of a fictional store and how a cookie could be used to keep track of what was purchased. It was just an exercise to show us how to create a cookie and put in into an array that could be used again by the cookie to display what had been clicked on. I still do not understand how the script can run in the order it is and produce a cookie to display. I guess my question should have been, does perl run script line by line or does it know to bounce among the lines to execute without giving it sub-routines. We already learned sub functions in the last chapter...
Can anyone explain why the above script works the way it does with it not being in logical order? Thank you again....