The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

Demonstrate how to write out JSON or XML to a file using handlers. XML is the default if no argument is specified.

The file name will be catalog.xml, catalog.json or catalog.html depending the value of $ARGV[0] (<null>, json or html).

Please keep in mind this example only generates a partial list of titles from Lovefilm. If you want a full list you will have to extend it by paging.

You will get a warning from this script that mentions "__EMPY_CONTENT__" which you can ignore.