develooper Front page | perl.beginners | Postings from December 2002

Multiple <img src="spacer.gif">

Thread Next
Mystik Gotan
December 27, 2002 04:47
Multiple <img src="spacer.gif">
Message ID:

First of all, hope you had a merry christmas and you will have a happy new 
year. Okay, so I'm a beginner, but I'm trying to get some more experince 
with Perl (although I use CGI, anyway). (I'm trying to get a job soon so I 
can buy my own computer and I'll use Linux/XP so... ;))

Anyway, I'm busy with a simple poll (might use it someway). You can ony vote 
for true/false. It's not very efficient, but I'll be creating 2 files, 
loop1.txt (true), loop2.txt (for voting false). I have $loop1 and $loop2, 
ofcourse, and I'll be incrementing then when a user votes. (If you have a 
more elegant way to solve this, let me know).

Then, I have a small image, say like 1px, spacer.gif. It sorta tells the 
user the procents of all of whom voted false/true (hope you get my point). 
Say like 46% voted, then the image must be printed out 46 times (as it's 
small, it'll fit). I want to do something like:

print HTML
True $loop x <img src="spacer.gif>

It's sorta pseudo-cde, but please help me :)

MSN Zoeken, voor duidelijke zoekresultaten!

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About