in reply to returning rows using SQL + Perl DBI

Win:

As fisher shows, you were pretty close. Fisher showed you how to do it using an array. Another small modification would let you use an arrayref:

while ($cols_for_row_B = $sth_atl->fetchrow_arrayref) { print OUTFILE join("\t",@$cols_for_row_B),"\n"; }

I went ahead and merged the three lines of the body of your inner loop, too.

The reason I bothered to reply, since you already had an answer is to warn you of a possible security problem. I don't know where you're getting your list of queries (@SQL_queries), but if they're coming from the user (such as from a web form, command line, etc.), then you'll want to be very careful. You don't want the users to give you queries that could potentially damage your database. I'd give you some links here, but I gotta get my kiddo off to school, so I'll try to update the node once I get to work.

...roboticus