Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PRINT Statement and CGI error

Status
Not open for further replies.

samesale

Programmer
Sep 15, 2003
133
US
Here is a partial program in CGI. However, the print statement gives an error.

#!/usr/bin/perl

use CGI;
$query = new CGI;

# itemr100search - use item2.html

$guest_file= "item2.out";
$counti2=0;
$counti2++;
$d ="\$";

print "Items of More than $d 100 value\n";

There are other print statements in the program but they do not give me any error. please help.
 
If you are printing general stuff before you print a header, then your web server will give an error instead of your desired output.

Try:
Code:
#!perl
use CGI;
$query = new CGI;

# itemr100search - use item2.html

$guest_file= "item2.out";
$counti2=0;
$counti2++;
$d ="\$";

print $query->header;
print "Items of More than $d 100 value\n";

'hope this helps

If you are new to Tek-Tips, please use descriptive titles, check the FAQs, and beware the evil typo.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top