Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^2: appending data to a file

by papidave (Monk)
on Feb 14, 2008 at 14:52 UTC ( #667935=note: print w/ replies, xml ) Need Help??


in reply to Re: appending data to a file
in thread appending data to a file

Are you really trying to capture the return value of $sth->fetchrow_array() in a scalar? Your comments imply that you're seeing data on STDOUT from the first print $fetchdata;, but I don't see how it could be the data you wanted. The DBI docs suggest:

while ( @row = $sth->fetchrow_array ) { print "@row\n"; }

That said, it seems to me that you'd likely run into trouble if the return value were ever an empty string ("") or something else that evaluates to FALSE.


Comment on Re^2: appending data to a file
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://667935]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (5)
As of 2014-10-20 05:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (72 votes), past polls