I'm writing (my first) module and have run into a snag. The purpose of the module is to retrieve remote information based on one field of user input. The location of the remote info is held in precompiled data (stored in __DATA__) within the module.

Everything works perfectly when I enter one value in the field.

I would now like to enter multiple values into the one field (delimited by spaces), toss those split values into an array, and iterate through the array, creating new objects for each value, validating input and retrieving the correct location for the remote data.

The problem is that the first value works, but the rest do not. After some troubleshooting, this is happening because the module has already iterated through <DATA> and is not starting at the beginning for the second value.

The DATA filehandle is almost a filehandle like any other. When used without being assigned a file, it will read from the __END__ token (or the __DATA__ token -- whichever comes first) to the end of your program. And you can seek() on it, too. However, doing: