Rod Jenkins <[EMAIL PROTECTED]> wrote: : : First of all I just started using cgi last week. : So, if you see something strange in my code it : would be lack of knowledge. : Here is the : question: : : I have some lines that display stuff, then do : more code, then display more stuff. Is there : a way to get the first stuff displayed before : the other code runs? here is an example:
Your running into a problem with the buffer. Perl's buffer is controlled by the special perl variable '$|'. You can read more about it in 'perlvar'. Block buffered output is the default. To set STDOUT to line buffer output change '$|' to a non-zero value. : #!/usr/bin/perl : use strict; : use warnings; : use diagnostics; Wow, you read the right books! Add: $|++; Or: $| = 1; : use CGI qw(:standard); #I really do not understand the qw : use CGI::Carp qw(fatalsToBrowser);# or the qw here 'qw' is described in 'perlop' under the Quote and Quote-like Operators section. I think of it as the "quote word" function because it puts single quotes around each word it finds. The list following a 'use Module' call is sent to a subroutine of the module called 'import'. import usually imports something into the scripts namespace. use CGI qw(:standard); Imports a large group of functions. You can import individual functions by not preceding them with ':'. Take a look at the CGI.pm documentation to get all the details. In your program the line is not needed. You are not using CGI.pm functions. use CGI::Carp qw(fatalsToBrowser); This line will send your errors to the browser. Normally they go to your logs and you get a 500 server error in the browser. This line is considered insecure once your script goes into production. Welcome to perl, Charles K. Clarkson -- Head Bottle Washer, Clarkson Energy Homes, Inc. Mobile Home Specialists 254 968-8328 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]