CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
html tag and perl

 



kade
Deleted

Jun 26, 2000, 6:44 PM

Post #1 of 2 (208 views)
html tag and perl Can't Post

Hi friends!
From the topic"shtml problem" I asked yesterday.
Now I've corrected all the error you suggested;
Here's my corrected scripts;(hit.pl)
$count++;
open(HIT,"hit.txt");
print HIT"$count";
close(HIT);
@hitarray=split(//,$count);
$max=@hitarray;
for($i=0;$i<$max;$i++){
print"<img src=http://www.mombuddy.com/$hitarray[$i].gif border=o width=15 height=20>";
}
####
I built it with the "Perl Builder" then view the output, it works.
but now the problem is at the html tag, I think.
this is the tag;
<p align="center"><!--#exec cgi="http://www.mombuddy.com/hit.pl"--></p>
After insertion, it returns nothing on the homepage.
Any suggestion?
Thanks


KaoAtlantis
Novice

Jun 26, 2000, 7:15 PM

Post #2 of 2 (208 views)
Re: html tag and perl [In reply to] Can't Post

One thing I noticed wrong with your script is the Missing '>' in the File Open...

$count++;
#-- Missing '>' is below
open(HIT,">hit.txt");
print HIT"$count";
close(HIT);
@hitarray=split(//,$count);
$max=@hitarray;
for($i=0;$i<$max;$i++){
print"<img src=\"http://www.mombuddy.com/
#-- I dont know if this would matter but you put an O as in Oh, where the Width=0 should be.
$hitarray[$i].gif\" border=\"0\" width=\"15\" height=\"20\">";
#-- Yes sometimes the quotes in the HTML are useful, Because some browers cant read it without. All Browsers, IE and Netscape need the Quotes around the img src="" tags.
}

That should Help Fix things....

[This message has been edited by KaoAtlantis (edited 06-26-2000).]

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives