[Bio] / Sprout / to_html.pl Repository:
ViewVC logotype

Annotation of /Sprout/to_html.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (view) (download) (as text)

1 : hwang 1.1 #/usr/bin/perl -w
2 :     use strict;
3 :     use Tracer;
4 :    
5 :     #Put the stdin into an array.
6 :     my @stdin_array;
7 :    
8 :     while (defined($_ = <STDIN>))
9 :     {
10 :     chomp;
11 :     push @stdin_array, $_;
12 :    
13 :     }
14 :    
15 :     #Make html table
16 :     print "<table border=1>\n";
17 :     # Given an array, create an html table
18 :     foreach my $val (@stdin_array)
19 :     {
20 :     print "<tr>";
21 :     my @cols=split(/\t/, $val);
22 :     foreach (@cols)
23 :     {
24 :     print "<td>$_</td>";
25 :     }
26 :     print "</tr>\n";
27 :     }
28 :     print "</table>";

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3