in reply to Break perl foreach loop
How about printing $x before testing to see if it matches "Patient"? Is that condition simply not being met?
Also, try to minimize slashes in your REs: Choose a different delimiter; you don't need to escape double-quotes; and character sets can help, too (consider s/["()]//g; versus s/\"|\(|\)//g;)
And consider combining multiple prints with commas or dots:
print "<DATE>", $x, "</DATE>\n"; # or print "<DATE>" . $x . "</DATE>\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Break perl foreach loop
by pvecchio (Initiate) on Mar 03, 2009 at 17:30 UTC |