Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^2: appending data to a file

by papidave (Pilgrim)
on Feb 14, 2008 at 14:52 UTC ( [id://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.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2024-04-24 02:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found