Ok, I decided to make my test.cgi into a kind of refernce page for when I'm creating my site. There is some kind of problem with my hash. Once again can someone explain to me what I'm doing wrong?
Here is what I got from doing perl -Tcw in the shell: > bash-2.05$ perl -Tcw test.cgi > bash-2.05$ Scalar found where operator expected at test.cgi line 37, near "print > "$link's" > > (Might be a runaway multi-line "" string starting on line 36) > > (Do you need to predeclare print?) > > Bareword found where operator expected at test.cgi line 37, near "$link's page > " > > (Missing operator before page?) > > Global symbol "%pages" requires explicit package name at test.cgi line 32. > > Global symbol "$link" requires explicit package name at test.cgi line 36. > > syntax error at test.cgi line 37, near "print "$link's " > bash: Scalar: command not found > bash-2.05$ Global symbol "%pages" requires explicit package name at test.cgi lin > e 37. Here is the source: #!/usr/bin/perl -wT use strict; use CGI qw/:standard/; print "Content-type: text/html\n\n"; my $date = localtime; my $body = param('body'); my $content = "body"; if ($body eq "yahoo") { $content = qq{<a href="http://www.yahoo.com/">Yahoo</a>\n}; } elsif ($body eq "date") { $content = $date; } my $nav = param('nav'); my $nav2 = "nav"; if ($nav eq "abc") { $nav2 = qq{Home About Me Content}; } elsif ($nav eq "def") { $nav2 = qq{Yahoo}; } my @var = ("scalar","array","hash"); my $name = "Joe"; my $welcome = "Welcome, $name! $var[0]"; %pages = ("Yahoo","http://www.yahoo.com/", "Google", "http://www.google.com/", "All The Web", "http://www.alltheweb.com/"); my $foreach = "foreach $link (links %pages) { print "$link's page: $pages{$link}\n"; }"; print <<"EndOfHTML"; <html> <head><title>Some CGI test</title></head> <body> <h1>CGI Test</h1> <p>$content</p> <br> <br> <p>$nav2</p> <br> <br> <p>$welcome <br> <br> <p>$var[1]</p> <br> <br> <p>$var[2]</p> <p>$pages{'All The Web'}</p> <p>$pages{'Google'}</p> <br> <br> <p>$foreach</p> </body> </html> EndOfHTML What should I change? Thank you, Kyle -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]