On Jan 13, 2004, at 10:12 AM, Duan Toh wrote: [..]
[..]
while ($sel->fetchrow_array) {
print OUTPUT '"';
print OUTPUT join '","', map {$_||0} @$_;
print OUTPUT '"',"\n";
}
you might want to go back and re-read the perldoc on perlvar - yes it is the default value - if that were a <FH> type of operation. think about the problem like
my $boo = some_sub(); print "\$boo is a ", ref($boo) , "\n"; my $i=0; while( some_sub($i++) ) { last unless $_; print "got $_ \n"; } print "ending $i\n"; #------------------------ # sub some_sub { my $i = shift; my @list = qw/a b c d/; return ($i)? 0: [EMAIL PROTECTED] ; } # end of some_sub
in this case there is a function call in the while loop that will return the array reference - but there is the minor detail that it is NOT being assigned to $_ as is your assumption...
HTH.
ciao drieux
---
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>