++
blokhead, but if you find yourself needing more of those
"things", you might want to look into
Template. Now
don't get me wrong, i love HTML::Template, but sometimes i
like having more expressional power, and Template has it:
These are my [% hobbits.size %] favorite hobbits:
<ul>
[% FOREACH hobbit = hobbits %]
<li>[% hobbit.name %]</li>
[% END %]
</ul>
Another cool thing (possibly overkill) is that each hobbit could be a real object, not just a hash in a list.
Oh yeah, you can get rid of the file slurp in your code by
using the filehandle attribute instead of the
scalarref one:
filehandle => \*DATA,
Much nicer and more efficient. Cheers. :)