On Thu, Jul 23, 2009 at 21:29, Steve Bertrand<st...@ibctech.ca> wrote: > I just ran into an issue where I was loosing literally half of some > expected data, which for a theoretical accounting system, would make for > some interesting audit trails (I already shave a fraction for myself, > but 50% will be noticeable ;) > > Is my oversight as simple as knowing that the previous-to-patch while() > statement below is simply throwing the row into $_, and then push()ing > the *next* row into @uledger_entries? > > --- ISP/trunk/lib/ISP/Ledger.pm 2009-07-24 01:17:20 UTC (rev 643) > +++ ISP/trunk/lib/ISP/Ledger.pm 2009-07-24 01:21:45 UTC (rev 644) > @@ -235,8 +235,8 @@ > > my @uledger_entries; > > - while ($sth->fetchrow_hashref) { > - push (@uledger_entries, $sth->fetchrow_hashref); > + while (my $entry_ref = $sth->fetchrow_hashref) { > + push (@uledger_entries, $entry_ref); > } > return \...@uledger_entries; > > Steve >
Yep, that would do it. And the new code should stop it. -- Chas. Owens wonkden.net The most important skill a programmer can have is the ability to read. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/