print line

They have: 53 posts

Joined: Dec 1999

I am sort of new at perl. I have configured alot of scripts but they all used raw html and not the line print.

The code I need to modify is as follows.

code:

sub show_page {

  print "Content-type: text/html\n\n";
  print "<html>\n";
  print "<head><title>$title1<\/title><\/head>\n";
  print "<body>\n";
  print "<center><h1>$title1<\/h1><p><hr><br>\n";
  print "This CGI script will check the validity of links in any static\n";
  print "webpage.  Type in the url and hit the button to receive a summary\n";
  print "of the links on a page.  The script will not work on dynamically\n";
  print "built pages.<p><hr>\n";
  print "<form method=\"POST\" ";
  print " action=\"$check\?command=check\"><br>\n";
  print "Enter the URL of the page to check.<br>\n";
  print "<input type=\"text\" name=\"url\" value=\"\" size=50><br>\n";
  print "<input type=\"submit\" name=\"submit\" value=\"submit\"><br><\/form>\n";
  print "<hr><center><a href=\"http\:\/\/www\.tboneconnection\.com\" target=\"\_blank\">T-Bone Connection<\/a><br>\n";
  print "<\/center><\/b>\n";
  print "<hr><\/center><\/body><\/html>\n";

}
[/code]

I need to add 

code:
<div align="center">
<p><a href="http://www.coolresources.com/"><img src="http://www.coolresources.com/images/cr_wh1.gif" width="550" height="77" Border="0"></a><br>
<a href="http://www.coolresources.com/"><font face="Arial, Helvetica, sans-serif" size="3">Home</font></a> <font face="Arial, Helvetica, sans-serif" size="3">• <a href="http://www.coolresources.com/tools/index.html">Tools</a> • <a href="http://www.coolresources.com/resources/index.html">Resources</a> • <a href="http://www.coolresources.com/articles/index.html">Articles</a> • <a href="http://www.coolresources.com/news.htm">News</a></font></p>

<!-- Begin OrbitCycle Code -->
<!--NOEDIT-->
<SCRIPT LANGUAGE="JavaScript1.1" SRC="http://banners.orbitcycle.com/code/w3nation/Network_Campaign/0000/b-IOLOX5.js">
</SCRIPT>
<NOSCRIPT>
<A HREF="http://banners.orbitcycle.com/router/w3nation/Network_Campaign/0000/a-IOLOX5.html" TARGET="_top">
<IMG SRC="http://banners.orbitcycle.com/banners/w3nation/Network_Campaign/0000/a-IOLOX5.html"></A>
</NOSCRIPT>
<!--/NOEDIT-->
<!-- End OrbitCycle Code -->

</div>
[/code]

My problem is I don't know how much code needs to go on each new print line and where to put the /\'s

I also have another script that is the same way I need to modify so knowing where to put those would be a great help.

Thanks
Jeremy 

Rock Hosting - Rock Solid Hosting Solutions

They have: 1,587 posts

Joined: Mar 1999

just put that second part inbetween this:

print <<EOF;
second code above here
EOF

good luck

------------------
CLICK 4 some tested resources for making money $, hosting, and web promotions.
My Site got hacked, but i'm coming back?

Traffic-Website.com free traffic, affiliate programs, hosting, & domain names.
My Site got hacked, but i'm coming back?

They have: 53 posts

Joined: Dec 1999

Ok I now have this but I get a 500 error now.

code:

sub show_page {

  print "Content-type: text/html\n\n";
  print "<html>\n";
  print "<head><title>$title1<\/title><\/head>\n";
  print "<body>\n";
  print <<EOF
<div align="center">
<p><a href="http://www.coolresources.com/"><img src="http://www.coolresources.com/images/cr_wh1.gif" width="550" height="77" Border="0"></a><br>
<a href="http://www.coolresources.com/"><font face="Arial, Helvetica, sans-serif" size="3">Home</font></a> <font face="Arial, Helvetica, sans-serif" size="3">• <a href="http://www.coolresources.com/tools/index.html">Tools</a> • <a href="http://www.coolresources.com/resources/index.html">Resources</a> • <a href="http://www.coolresources.com/articles/index.html">Articles</a> • <a href="http://www.coolresources.com/news.htm">News</a></font></p>
<!-- Begin OrbitCycle Code -->
<!--NOEDIT-->
<SCRIPT LANGUAGE="JavaScript1.1" SRC="http://banners.orbitcycle.com/code/w3nation/Network_Campaign/0000/b-IOLOX5.js">
</SCRIPT>
<NOSCRIPT>
<A HREF="http://banners.orbitcycle.com/router/w3nation/Network_Campaign/0000/a-IOLOX5.html" TARGET="_top">
<IMG SRC="http://banners.orbitcycle.com/banners/w3nation/Network_Campaign/0000/a-IOLOX5.html"></A>
</NOSCRIPT>
<!--/NOEDIT-->
<!-- End OrbitCycle Code -->
</div>
EOF
  print "<center><h1>$title1<\/h1><p><hr><br>\n";
  print "This CGI script will check the validity of links in any static\n";
  print "webpage.  Type in the url and hit the button to receive a summary\n";
  print "of the links on a page.  The script will not work on dynamically\n";
  print "built pages.<p><hr>\n";
  print "<form method=\"POST\" ";
  print " action=\"$check\?command=check\"><br>\n";
  print "Enter the URL of the page to check.<br>\n";
  print "<input type=\"text\" name=\"url\" value=\"\" size=50><br>\n";
  print "<input type=\"submit\" name=\"submit\" value=\"submit\"><br><\/form>\n";
  print "<hr><center><a href=\"http\:\/\/www\.tboneconnection\.com\" target=\"\_blank\">T-Bone Connection<\/a><br>\n";
  print "<\/center><\/b>\n";
  print "<hr><\/center><\/body><\/html>\n";

}
[/code]

please help 

Rock Hosting - Rock Solid Hosting Solutions

They have: 122 posts

Joined: Jun 2000

it needs to be 'print <<EOF;' notice the semi-colon

They have: 1,587 posts

Joined: Mar 1999

yeap, just like mine in the example. that's the most fustrating thing about scripts. misplace a ; or a \ and ur script don't work.

------------------
CLICK 4 some tested resources for making money $, hosting, and web promotions.
My Site got hacked, but i'm coming back?

Traffic-Website.com free traffic, affiliate programs, hosting, & domain names.
My Site got hacked, but i'm coming back?

They have: 53 posts

Joined: Dec 1999

Doh

It works great now
Thanks

They have: 161 posts

Joined: Dec 1999

That's the most frustrating problem with ANY programming language: give it the wrong syntax and it won't work correctly. Luckily, Perl gives you multiple quoting syntaces, so you don't have to worry about backslashing every other character.

------------------
--
MIDN 4/C PINYAN, NROTCURPI, US Naval Reserve

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.