in reply to How can I display DBM entries in an HTML table?
can be replaced with the built-in keys and values functions.while (($key,$value) = each %hash) { push(@keys, $key); push(@values, $value); }
I second the recommendation to enable strict and to get rid of your global variables. It's also my opinion that you're really overthinking things -- does HTML::Template provide a means to iterate over hash keys? If so, I'd just do that, rather than converting from hash to array of hashrefs.
|
|---|