Wow, embarrassing I missed that? At any rate thanks for all the quick
replies.
On Thu, Apr 8, 2010 at 5:30 PM, Lyle wrote:
> Problem with your hash scoping:-
>
>
> my @error = @_; my @error_loop = ();
> print header;
> foreach (@error) {
> my %error_data;
>
> $error_data{ERROR_DATA}
Put the 'my %error_data;' inside the loop. You're pushing a reference to
the same hash over and over again.
-sam
On Thu, Apr 8, 2010 at 5:20 PM, Shawn Scott wrote:
> Good Afternoon,
>
> I have been using HTML::Template for some time and have recently run into
> an starnge issue. I have the fol
On Thu, 8 Apr 2010 17:20:36 -0400, Shawn Scott wrote
> Good Afternoon,
>
> I have been using HTML::Template for some time and have recently run
> into an starnge issue. I have the following code
>
> my @error = @_;
> my @error_loop = ();
> my %error_data;
> print header;
> foreach (@err
On Thu, Apr 08, 2010 at 05:20:36PM -0400, Shawn Scott wrote:
>When I run this code it gives me the correct number of elements, based on
>the number of errors in the loop @error array. The only issue each one is
>shown as the last line pushed to the @error_loop.
Well, yes. You're defining a single
Problem with your hash scoping:-
my @error = @_; my @error_loop = ();
print header;
foreach (@error) {
my %error_data;
$error_data{ERROR_DATA} = $_;
push(@error_loop, \%error_data);
}
--
Download IntelĀ® P
Good Afternoon,
I have been using HTML::Template for some time and have recently run into an
starnge issue. I have the following code
my @error = @_;
my @error_loop = ();
my %error_data;
print header;
foreach (@error) {
$error_data{ERROR_DATA} = $_;
push(@error_loop, \%error_data