ROW space (was well split!!!)

[email protected] Wed, 7 Mar 2001 13:27:20 -0500
Newsgroups perl.macperl.webcgi
Message-ID <p05010401b6cc2c74c333@[64.194.142.225]>
>  > However, the following code generates an error:
>  >
>  > open(DATA,$datafile) || &open_error($datafile);
>  > while (<DATA>) {
>  > next if /^$/;
>  > my ($database_id, $category, $variable_name, $price,
>  > $description, $item_number) = split(/\t/);
>  >
>  > print <<ROW;
>  > <TR>
>  > <TD>$variable_name</TD>
>  > <TD>$description</TD>
>  > </TR>
>  > ROW
>  > }
>I don't know if it is the way my email program presented it... but make sure
>there are no spaces before the closing ROW. If that part is ok then what
>error is being generated by this code?
>
>adam

adam:

The error was an INTERNAL SERVER ERROR when I ran the cgi on my site.

However, you solved the problem -- it was a space before the ROW that 
caused the problem.

That space thing sure screws up the placement of the "pretty" code I 
like to write. Any way around that?

I like this:
	print <<ROW;
  	<TR>
	<TD>$variable_name</TD>
	<TD>$description</TD>
	</TR>
	ROW
	}

Instead of this:

	print <<ROW;
	<TR>
	<TD>$variable_name</TD>
	<TD>$description</TD>
	</TR>
ROW
	}

Thanks.

tedd


-- 
http://sperling.com/