in reply to Re: Can't seem to use an AoH with Template::Toolkit
in thread Can't seem to use an AoH with Template::Toolkit
Maybe I've mis-understood you -- I made the code less fancy and used a hash instead of a hashref, as shown below, and got the sme result.
for ( 1..9 ) { my $last = "last_name$_"; my $first = "first_name$_"; my %h; if ( length($vars->{$last}) && length($vars->{$last}) ) { $h{'last_name'} = $vars->{$last}; $h{'First_name'} = $vars->{$first}; } else { # Leave a blank one at the end. $h{'last_name'} = ''; $h{'First_name'} = ''; last; } push ( @reg_array, \%h ); }
I guess I don't understand your answer.
I'm able to get the information from $vars just fine, but it seems putting it back onto the form is a problem.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Can't seem to use an AoH with Template::Toolkit
by perrin (Chancellor) on Jan 29, 2007 at 14:10 UTC |