in reply to File/Fetch Array

You can move your open and $~ statements out the while loop. Saves you execution time. It is more clear to name the filehandle and the format identical:
open NEWDATA, ">>newdata.txt" or die "Can't append to newdata.txt: $!" +; format NEWDATA .....#stuff goes here . write NEWDATA while( @data = $query->fetchrow ); close NEWDATA;
See perlform for more about formats. (The formats are a case apart. Different namespace and so on.)

Hope this helps,

Jeroen
"We are not alone"(FZ)

Replies are listed 'Best First'.
Re: Re: File/Fetch Array
by qball (Beadle) on Apr 04, 2001 at 02:07 UTC
    Yup, that worked. Worked too well actually. With a little extra effort I managed to get exactly what I wanted. Thanks!