in reply to Remove hyperlinks from the lines which have special character?

ya know ... you dont explain very well, nor give full enough examples, we keep having having to guess.

Kinda remembering from what was asked before

while ($line=<$fhin>) { ... next if $data[0]=~m/[\=\%]/; ... place where you print out '<tr>'; ... for my $word(@data){ ...
the "next if .." line has to be before you print the <tr> That may mean you have to move the @data=split(????,$line) up higher too

Replies are listed 'Best First'.
Re^2: Remove hyperlinks from the lines which have special character?
by finddata (Sexton) on Mar 13, 2017 at 09:34 UTC
    This code will remove the entire hyperlink line.I like to remove only the hyperlinks from the line.THe line contents should be there the hyperlink line(means tha underlined line)how it can be removed.

      my $dolink=$data[0] !~ m/[\=\%]/; for my $word(@data){ $check++; print $fh_out '<td>'; if($check==1 && $dolink ) { print $fh_out '<a href="'.$href.'" >'.$word.'</a>'; } else { print $fh_out $word;} print $fh_out '</td>'; }
      That isnt what you showed as your sample output tho, whole lines were missing ya know. cleaned it up a little too. you dont really want the training TRAILING space in the href= either.