Hello fellow monks. Hope you're all doing great.

I have a little CGI issue right now. Can you give me a hand with that?

Here's the thing. I am developing a small site link verification program. Actually, the program is already developed...right now I'm working on the visual presentation of it. Since I was asked to make it a web page, I did it on CGI. I have all the code for the cgi and the whole process for the link verification in one file. It only accesses an external file to get the URL list. The CGI portion is object-based and quite simple right now, and it goes like this:
my $query = new CGI; print $query->header; print $query->start_html("Verificador de Ligas"); print "<H1> Verificaci&oacute;n de ligas</H1>\n"; #the whole process code goes here and start running automatically. print "Paginas verificadas: $ahora<br><br>"; print "Paginas no encontradas: $urlsmuertas<br>"; foreach(@dead_urls_to_keep) {print "$_<br>";} print "<br>Ligas con errores: $links_failed<br>"; foreach(@dead_links_to_keep) {print "$_<br>";} print $query->end_html;

There is something missing, however. I am required to place a counter, like a progress bar or something to measure the process, since it takes a while. Right now, the only thing I've came up with is a cheap print "$ahora de $total<br>"; this is, a list that goes "1 de 40 2 de 40, 3 de 40" and so on.

Any idea on how can I make a counter that doesn't flood the whole screen? I was thinking of doing a constant screen-refreshing with the progress, but I don't have a clue of how to do it. Also, it is not necessary to do everything in the same file, any ideas on how to do it with various files are also appreciated.

Thank you for reading and even more thanks for answering.
Cheers.

In reply to Implementing a progress bar on CGI by Deib

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.