Your comment does not match your code:
# Load data in array. foreach $i(0..$#{$rows}) { foreach $j (0..$#{$rows->[$i]} ) { $rows->[$i][$j]; } }
The code does nothing. It also doesn't make sense. You still haven't answered what you think this code should do.
Please read perldsc, perlreftut and use Data::Dumper to print out your data structure, so you can see what your data structure is and how to use it.
You keep talking about "email", but "email" seems to be largely unrelated to the problem you have here. If you think "It is as if the sql prepare holds on to the first value.", what steps did you try to validate or reject that idea? Dumping out your data structure is very helpful in these situations. If you "know the value changes, because it prints each time and email it each time", then the place where you are printing data must be different from the place where you try to use the data in Excel. Investigate these situations and find where your data deviates from your assumptions.
I'm sorry that I can't be of much more assistance - debugging a program is a process that you need to largely do yourself.
In reply to Re^7: SQL query using dynamic array
by Corion
in thread SQL query using dynamic array
by cocl04
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |