For example:
a |-- a.config |-- a.html `-- a_class |-- class_Verification | `-- rev1 | |-- _projects_a_a_class_class_Verification_rev1.config | |-- _projects_a_a_class_class_Verification_rev1.html | |-- a_class.config `-- a_class.html
In the above structure i have the _projects_a_a_class_class_Verification_rev1.html file.If i opened the file it will have the following contents.Here the column 1 have the hyperlinks (i.e sl.no have the hyperlinks.i like to remove the hyperlinks only from the final .html file under rev1.
contents from _projects_Muska_Muska_Digital_Digital_Verification_rev1.html :

SL.NO CHECKLIST ITEM VALUE COMMENTS CONFIRMATION CREATED_BY=kjani Review the RTL system level compile log; confirm that warnings can + be ignored. 1 Name of the Reviewer Subin CORRECT To Be Done 2 Is the review complete? No CORRECT To Be Done 3 List the number of warnings if any and provide comments To Be +Done CORRECT To Be Done Review system level RTL regression failures; confirm that failing +tests can be dispositioned. 4 Name of the Reviewer To Be Done CORRECT To Be Done 5 Is the review complete? No CORRECT To Be Done


Here is the code: In the below code if i give $check==0 it will affect other .html files too.So i dont need to remove hyperlinks from other html files.I want to remove hyperlink from column 1 only under the rev* named folders .html files. So that how can i fix it.
open my $fh, '<', $file or die "Can't open $file: $!"; while (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 $check=0; my $dolink=$data[0] !~ m/[\=\%]/; for my $word(@data){ $check++; print $fh_out '<td>'; if($check==1 && $dolink ) { $word=~s/("\S+|\S+|")\s*/$1/g; print $fh_out qq[<a href="$word/$word.html">$word</a>]; } else { print $fh_out $word;} print $fh_out '</td>'; } }

In reply to How to remove the links from the first column only from last tree struture (i.e from rev named folders) of the .html file using perl? by gpssana

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.