anupchandu has asked for the wisdom of the Perl Monks concerning the following question:
| Status | Company Name | Start Date | End Date |
| Pass | My Company1 | Start Date | End Date |
| Pass | My Company2 | Start Date | End Date |
| Pass | My Company3 | Start Date | End Date |
| Pass | My Company4 | Start Date | End Date |
| Pass | My Company5 | Start Date | End Date |
Can someone address this issue? Thanks in Advance -Anoop#!C:/Perl/bin/perl.exe use strict; use warnings; use Win32; use Cwd; use CGI; use HTML::Template; main(@ARGV); sub main { use Cwd qw(abs_path); my $pwd = abs_path(); my $tempfile = "$pwd/temp/test.txt"; open(FH, $tempfile) || die "Error: $!\n"; my $line; while ($line=<FH>) { print "<tr>"; my @cells= split /\s+/,$line; foreach my $cell (@cells) { print "<td>$cell</td>"; } print "</tr>\n"; } close FH; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Parsing Text from a File to HTML Table
by Athanasius (Archbishop) on Oct 27, 2013 at 12:45 UTC | |
|
Re: Parsing Text from a File to HTML Table
by Not_a_Number (Prior) on Oct 27, 2013 at 13:30 UTC | |
|
Re: Parsing Text from a File to HTML Table
by kcott (Archbishop) on Oct 28, 2013 at 02:56 UTC | |
|
Re: Parsing Text from a File to HTML Table
by marinersk (Priest) on Oct 27, 2013 at 15:03 UTC |