Loading ...
Sorry, an error occurred while loading the content.
 

RE: [PBML] Printing an array containing a table to a file in HTML format

Expand Messages
  • Zabil Cheriya Maliackal
    Ok try out this, Something I concocted in a hurry open(THTML, filename.html ); print THTML ; print THTML ; print THTML ; foreach $v
    Message 1 of 1 , Oct 9, 2000
      Ok try out this,
      Something I concocted in a hurry
      open(THTML,">filename.html");
      print THTML "<HTML>";
      print THTML "<BODY>";
      print THTML "<TABLE>";
      foreach $v in @array
      {
      ($columnone,$columntwo) = split(/ /,$v); # please use the regular
      expression for space between // or just use it as / /
      print THTML "<TR>";
      print THTML "<TD>" . $columnone . "</TD>";
      print THTML "<TD>" . $columntwo . "</TD>";
      print THTML </TR>;
      }
      print THTML "</TABLE>";
      print THTML "</BODY>";
      print THTML "</HTML>";
      close(THTML)

      sorry for the sloppiness but it is supposed to do the work.
      Zabil


      ----------
      From: Amedeo.Avanzato@... [SMTP:Amedeo.Avanzato@...]
      Sent: Monday, October 09, 2000 4:31 PM
      To: perl-beginner@egroups.com
      Subject: [PBML] Printing an array containing a table to a file in
      HTML format

      Suppose that I have an array done like this:

      $array[0]="NAME SURMAME";
      $array[1]="Amedeo Avanzato";
      $array[2]="Pippo Pluto";

      Fields separated by blanks.
      The firsxt row is the title one.

      Can I write this table to a file in HTML Format without writing by
      hand all html headers and tags?
      Thenks ...
      Amedeo


      -------------------------- eGroups Sponsor
    Your message has been successfully submitted and would be delivered to recipients shortly.