Iterator-Diamond reviews

RSS | Module Info

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.