in reply to Query Subroutine
You have not scoped @new_row to run_query(), so every time you call the function, you push values onto the same array. The solution to this is to write:
my @new_row;... just before the while loop. I encourage you to scope all of your variables lexically in the tightest possible scope; it will help you avoid many problems like this.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Query Subroutine
by Fuism (Beadle) on Aug 08, 2005 at 03:50 UTC | |
by chromatic (Archbishop) on Aug 08, 2005 at 04:13 UTC | |
by Fuism (Beadle) on Aug 08, 2005 at 14:50 UTC |