Don't print anything before the header. Create the list and then print it in the page
pojmy $records = $sth->fetchall_arrayref; my $list = join ' ',map{$_->[0]}@$records; print "Content-type: text/html\n\n"; print <<END_HTML; <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Untitled Document</title> </head> <body> <p>Age list </p> <p>$list</p> </body> </html> END_HTML
In reply to Re^5: fetch all data
by poj
in thread fetch all data
by bigup401
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |