in reply to Re^3: How to add hyperlink for every table data using perl?
in thread How to add hyperlink for every table data using perl?
Untested, YMMVwhile (my $line=<$fh>) { chomp $line; for($line) { s/\&//g; s/[\\\_\@\_]//g; s/COMMENT//g; } my @data = split /:/, $line; my $class = $data[0] ? 'normal' : 'bold'; print $fh_out qq[<tr class="$class">]; my $ct=0; for my $word(@data){ $ct++; print $fh_out '<td>'; if ($ct==1){ print $fh_out '<a href="' .$href_to_what{$word} .'">'; } print $fh_out $word; if ($ct==1){ print $fh_out '</a>'; } print $fh_out '</td>'; } print $fh_out "</tr>\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: How to add hyperlink for every table data using perl?
by finddata (Sexton) on Mar 09, 2017 at 07:29 UTC |