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

Here am unable to fix the hyperlink line for lines.

Yes you are absolutely right.I should omit the hyperlinks for the line starts with overall status and partial status.

  • Comment on Re^2: Remove hyperlinks from the lines which have special character?

Replies are listed 'Best First'.
Re^3: Remove hyperlinks from the lines which have special character?
by Corion (Patriarch) on Mar 13, 2017 at 09:16 UTC

    Ah. So the output you show is not the output your script actually generates.

    I would split up the task into two steps:

    1. Check whether a hyperlink should be added to a line
    2. Print the line with a hyperlink or print it without

    For the first step, you should write a subroutine needsHyperlink, which checks whether a line needs a hyperlink:

    sub needsHyperlink { my( $line ) = @_; ... # see perldoc perlre for checking }

    Then, you call that function to see whether you need to add a hyperlink in the output or not:

    my $outputHyperlink = needsHyperlink( $line ); if( $outputHyperlink ) { # print line with hyperlink } else { # print line without hyperlink, or maybe don't print it at all };

    Update: added second sentence about not printing things