That is extremely weird, as reading through both examples they should be doing the exact same thing. Can you give examples of the ordering from each (maybe something weird in the data being sorted??)? I will agree that sample 1 is a little weird -- that nested foreach loop is completely useless since
@$row only ever has one element in it.
Anyways, i didn't answer your primary question, but i'm curious as to the answer and will watch this thread.. I can also add though that you can use one of
DBI's shortcut methods, too:
my $paths = $dbh->selectcol_arrayref(""select path from application_ta
+ble where number = ? ORDER BY some_other_number", {}, $number);
foreach my $path ( @$paths ){
print "PATH: $path\n";
}