I have written following code, but its not working properly..

#!usr/bin/perl use strict; my $headrow="<Tr><Tc>At transplantation (POD 0) (n<26>73)<Tc>Early sta +ge (POD 2) (n<26>34)<Tc>Late stage (POD 28) (n<26>25)"; my $str= "<</PICK;t1;0;0;page>> <<tt>>TABLE<ens>1. <mc>Histologic assessment of the liver and islet after transplantation +: comparison among each time points in histologic changes <starttab;1;4><dumline>Islet: cellular infiltration<nx>At transplantat +ion (POD 0) (n<26>73)<nx>Early stage (POD 2) (n<26>34)<nx>Late stage +(POD 28) (n<26>25)<enddum> <Tr><Tc>At transplantation (POD ) (n<26>73)<Tc>Early stage (POD 2) (n< +26>34)<Tc>Late stage (POD 28) (n<26>25) <Tr>Liver: necrosis<Tc>Liver: necrosis<Tc>23/34 (0.68 <22>0.08)<itsup; +a,b><Tc>0/25 (0 <27>0) <Tr>Liver: hypoxia<Tc>Liver: necrosis<Tc>24/34 (0.71 <27>0.08)<itsup;a +,b><Tc>0/25 (0 <27>0) <Tr>Liver: apoptosis<Tc>Liver: necrosis<Tc>223/34 (0.68 <27>0.08)<itsu +p;a,b><itsup;a,b><Tc>0/25 (0 <27>0) <Tr>Islet: cellular infiltration<Tc>Liver: necrosis<Tc>15/34 (0.44 <27 +>0.09)<itsup;a,b><Tc>0/25 (0 <27>0) <Tr>Islet: apoptosis (%)<Tc>Liver: necrosis (POD)<Tc>62.00 - 7.41<itsu +p;a,b><Tc>0 <27>0<endtab> <<tabft>>Histologic change score was indicated as islet numbers accomp +anied with histologic change (necrosis, hypoxia, apoptosis, and cellu +lar infiltration)/total islet numbers (mean score<27>standard error o +f the mean), except islet apoptosis (%). Islet apoptosis (%) was indi +cated as the percentage of apoptotic to total islet cells. <904>n<905 +> is total islet number. <mc><itsup;a>Significant difference (<mdit>P<med><178>0.05), at the ea +rly stage vs. at transplantation. <mc><itsup;b>Significant difference, at the early stage vs. at the lat +e stage. <mc>POD, postoperative day.</.>"; my $tr="<Tr><Tc>At transplantation (POD 0)"; if ($str=~m/$tr/g) { print "$headrow\n"; }

I thought it will print $headrow, but its not printing anything

if i write  my $tr="<Tr><Tc>At transplantation "; It prints $headrow.

And if i write  my $tr="<Tr><Tc>At transplantation ("; I get error for unmatched regex

I dont know why it it happennig.

If i try to mathch $headrow with $str, and try to print something still its not printing anything

Please help Thank you

In reply to This is Strange!!! Please help me.. by tej

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.