in reply to Re^2: Remove hyperlinks from the lines which have special character?
in thread Remove hyperlinks from the lines which have special character?
Ah. So the output you show is not the output your script actually generates.
I would split up the task into two steps:
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
|
|---|