Thanks all for the feedback on the WARNING message that I am getting. I know that I 
can turn warning off at that moment of code, but I want to know for my own knowledge 
what is the warning all about. So, here is the entire sub routine. NOTE** I declared 
@records as a global earlier..
 
JC
 
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;  
     
 my $recordlist=join(",",@record);   
   
 print OUTFILE "$recordlist\n";   
 
       }return "success"; 
       
       } 
}
[EMAIL PROTECTED] wrote:




Where do you populate @record? Such messages occur when populating an
array with contents of a file (if the file contains a bunch of newlines).
So make sure you know what the array is getting populated with by testing.


Also, you want to join before printing, correct? So swap the lines (but
that is not the cause of the warning).

> print OUTFILE "$recordlist\n";
>$recordlist=join(",",@record);

I will try to view the contents of @record with
foreach my $item (@record) {
print " ..... item: $item\n";
}




__________________

William Ampeh (x3939)
Federal Reserve Board

Reply via email to