in reply to How can I keep the values in the array?
First guess at a quick glance: This is a scoping problem, try
@row1 in your code is only valid inside the loop-body, always use strict; and use warnings to fight scoping errors and "code better(tm)" ;-)#---- snip --- my @allrows; my @UDNumber; while (my @row1 = $sth ->fetchrow_array){ print "@row1\n"; # prints the current row @allrows = (@allrows,@row1); @IDnumber=@row1; } # allrows contains everything now # IDNumber contains the last row
regards,
tomte
Hlade's Law:
If you have a difficult task, give it to a lazy person --
they will find an easier way to do it.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: How can I keep the values in the array?
by luoina (Acolyte) on Mar 03, 2004 at 19:41 UTC | |
by revdiablo (Prior) on Mar 03, 2004 at 21:33 UTC |