I used ---print OUTFILE join(",",@record), "\n";--- that you suggested and still got the error. sub data_collect {unless (open(OUTFILE,">$fourdayreport")) {die open(ERRORLOG, ">>$errorlog") && print ERRORLOG "Sorry file $dayreport couldn't be created\n"; return "Failed";} else{ while( @record= $sth->fetchrow_array())
{ print OUTFILE join(",",@record), "\n"; OUTFILE "$recordlist\n } return "success"; } } [EMAIL PROTECTED] wrote: sub data_collect {unless (open(OUTFILE,">$fourdayreport")) {die open(ERRORLOG, ">>$errorlog") && print ERRORLOG "Sorry file $dayreport couldn't be created\n"; return "Failed";} else{ while( @record = $sth->fetchrow_array() ) { # no warnings; #::::::::::::INSERTED ::::::: #Since you are not doing anything with $recordlist, I will do one of the following: print OUTFILE join(",",@record), "\n"; #OR: for ( my $i = 0; $i < $#record; $i++) { ( $i < $#record ) ? print "$record[$i]," : print "$record[$i]\n"; } #::::::::::::::::::INSTEAD OF ::::::::::::: my $recordlist=join(",",@record); print OUTFILE "$recordlist\n"; }return "success"; } } __________________ William Ampeh (x3939) Federal Reserve Board -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]