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]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to