tej has asked for the wisdom of the Perl Monks concerning the following question:
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: This is Strange!!! Please help me..
by ikegami (Patriarch) on Sep 28, 2010 at 14:22 UTC | |
|
Re: This is Strange!!! Please help me..
by Corion (Patriarch) on Sep 28, 2010 at 14:20 UTC | |
by ikegami (Patriarch) on Sep 28, 2010 at 14:29 UTC | |
|
Re: This is Strange!!! Please help me..
by kennethk (Abbot) on Sep 28, 2010 at 14:31 UTC | |
by ambrus (Abbot) on Sep 29, 2010 at 08:55 UTC | |
by kennethk (Abbot) on Sep 29, 2010 at 13:56 UTC |