Here is what I am doing. I shortend the sub, using local variables, and simplifying the whole thing to just print to screen. I use your loop once I collect the records into the @record variable and join them with ","... Still to no avail, that menacing warning stays. Thanks. my $sql=qq( select * from bill where rownum <100 ); my $sth=$dbh->prepare($sql); $sth->execute(); my $recordlist; my $dayreport = "/cygdrive/c/cygwin/my_Perl/basic_script/testfile.txt";
my @record; while( @record= $sth->fetchrow_array()) { $recordlist=join(",",@record); #This statement is causing the problem for ( my $i = 0; $i < $#record; $i++) { print "$record[$i],"; } print "$record[$#record]\n"; } exit; $dbh->disconnect; [EMAIL PROTECTED] wrote: What about manually stepping through the array elements? That is: for ( my $i = 0; $i < $#record; $i++) { print "$record[$i],"; } print "$record[$#record]\n"; __________________ William Ampeh (x3939) Federal Reserve Board