in reply to Perl color identify ?

It is most certainly possible to render HTML using Perl. However, your question is a little vague to give you a full answer. Nonetheless, here is a generalized explanation of one method of doing so.

One method is using a simple CGI. You're web server will have to be able to interpret CGI scripts, however most can with simple configuration changes. For example, Apache for Windows and/or Linux will let you do so very simply.

Once configured, you can start your CGI script with very minimal code overhead. For example, the following will output 'Hello World!':
#!/usr/bin/perl use strict; use warnings; print "Content-type: text/html\n\n"; print "Hello World!<br/>\n"; exit;
Now, using data from any datasource, etc., you can generate your HTML table using a simple loop, dynamically adding rows as necessary.

Also, as a last note, you may also want to look into the CGI Perl Module on CPAN. There is a lot of functionality in this module that you will most likely take advantage of, particularly when beginning in Perl CGI scripts.

Good Luck!

Update:

Just noticed that this node might be of some interest to you as well.

---hA||ta----
print map{$_.' '}grep{/\w+/}@{[reverse(qw{Perl Code})]} or die while ( 'trying' );

Replies are listed 'Best First'.
Re^2: Perl color identify ?
by sunny (Initiate) on Nov 29, 2005 at 04:20 UTC
    Hi

    i was chatting with some people many says it is impossible.you gave me some hope hope. thank you. How about the color ?

    is it possible to identify it ?

    sunny
      Being that your question is still a little vague to me, there is a chance I'm misunderstanding it. However, I will explain my assumptions and we can run from there:

      I'm assuming:
      1. You have a static *.html table that has, among other things, row/columns with one of three colors in them.
      2. If you click a link relative to one of these rows, you would like to be directed to another page with the 'linked' color.

      If I'm incorrect with either of my two assumptions, please let me know and I will try to re-factor my answer. Though, given these assumptions, here is something you can do:

      Your HTML links could resemble the following:
      <a href="color.cgi?source_color=red">Red link</a>
      Next, in the CGI script, you could code the following:
      #!/usr/bin/perl use strict; use warnings; use CGI; my $source = CGI::param( 'source_color' ); my $color_map = { 'red' => 'CCFF33', }; my $destination = '#' . ( $color_map->{$source} || 'CCFF33' );
      Now, for each of the 'source' colors relative to the link, you will be able to translate it to the destination HTML color code. Then, using the HEX representation of the color within the $destination variable, you will be able to use it where every you like throughout your code.

      Again, I might not understand your real problem. If this doesn't sound like a solution like you were looking for, feel free to elaborate on your question. Otherwise, hope this helps!

      ---hA||ta----
      print map{$_.' '}grep{/\w+/}@{[reverse(qw{Perl Code})]} or die while ( 'trying' );
        Hi
        NO SOURCE DESTINATION NET SERVICES row1 link in red color link in yellow nmfp ppp row2 link in yellow color link in yellow ndfmp sdf row3 link in red color link in yellow nfgmp ppdp row4 link in yellow color link in yellow nmp psp
        This is how it will look like. i want to collect the info about the row that has source in red color and destination in yellow (no need to click on the link) i jsut want to check the color of the link.

        is this fine ?

        sunny