Iterator-Diamond reviews

cpanratings
 

RSS | Module Info | Add a review of Iterator-Diamond

Iterator-Diamond (0.03) *****

Just what I was looking for. Allows me to emulate classic diamond functionality in a safer and flexible way. I had code that read from a single file, and now it reads multiple files just like a perl -n one-liner.

Just pass the constructor a list of filenames, and you'll get a filehandle. Read from the filehandle, and you can read all the files' contents in a loop without having to open and close the individual files. You can also easily tell which file you are reading from at any given time.