Zary Necheva wrote at Thu, 26 Sep 2002 21:36:35 +0200: > I have a file with this data: > > ..CITY/STATE. |aBalt., MD > ..COUNTY. |aBALTIMORE > ..CITY/STATE. |aBaltimore, Md > ..COUNTY. |aBALTIMORE > ..CITY/STATE. |aBaltimore, Maryland > ..COUNTY. |aBALTIMORE > ..CITY/STATE. |aBaltimore, MD > ..COUNTY. |aBALTIMORE > ..CITY/STATE. |aBALTIMORE, Md > ..COUNTY. |aBALTIMORE > …… > > The data has to be change this way” > ..CITY/STATE. |aBaltimore, MD > ..COUNTY. |aBALTIMORE > ..CITY/STATE. |aBaltimore, MD > ..COUNTY. |aBALTIMORE > ……………… > This is my script : > > #!/usr/bin/perl -w > use strict; > > while(<>){ > s/\.CITY\/STATE\. \|aBalt*/\.CITY\/STATE\. \|aBaltimore, MD/g; ^^
That's a sequence of t's. You meant surele t.* instead > print;} BTW: Why don't you change Maryland's wrong shortcuts directly: while (<>) { s/(Md|Maryland)$/MD/g; print; } Greetings, Janek -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]