Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://667935]
help
Chatterbox?
[Your Mother]: The Inquisition? What a show!
[LanX]: which thread are you talking about?
[erix]: great hats
[erix]: the latter-day part of [Answered; thanks.] Can this be explained in layman's terms?
[LanX]: oh I see - a deeply buked discussion

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2017-01-18 00:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (159 votes). Check out past polls.