in reply to Re^2: Can't seem to use an AoH with Template::Toolkit
in thread Can't seem to use an AoH with Template::Toolkit

In your original code, you get a hashref back from $cgi->Vars, and then you try to put @reg_array into it as if it were a normal hashref. That would work, except that $vars that comes back from $cgi->Vars is not a hashref, but rather a tied variable that CGI generated.

I can't tell if the code you show here still has that problem because you didn't show that part. If it does, a quick fix would be to change that line where you call $cgi->Vars to this:

my %vars = $cgi->Vars; my $vars = \%vars;