Just a idea : #!/usr/bin/perl -w use strict;
my $old_file="address.txt"; open(OLD,$old_file) || die "can not open $old_file for reading: $!"; while(<OLD>){ s/\#(.+)$/Apt $1/ if /.ADDRESS\s+1/; print; } __END__ José. > -----Original Message----- > From: Zary Necheva [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, October 09, 2002 8:59 PM > To: [EMAIL PROTECTED] > Subject: How to substitute "# " > > > Hi, > How can I substitute "# " or "( " or " )" with some text for ex > > Old File: > ..ADDRESS 1. |a2112 N. ( Charles St.) #199 B > ..ADDRESS 2. |a2112 N. Pulaski St. > ..ADDRESS 1. |a2112 N. Pulaski Street #33 > ..ADDRESS 2. |a2112 N. ROSEDALE STREET > ..ADDRESS 1. |a2112 N. (Smallwood Street) > ..ADDRESS 2. |a2112 Orleans St. #45 > ................ > > New File > ..ADDRESS 1. |a2112 N. Charles St. Apt 199 B > ..ADDRESS 2. |a2112 N. Pulaski St. > ..ADDRESS 1. |a2112 N. Pulaski Street Apt 33 > ..ADDRESS 2. |a2112 N. ROSEDALE STREET > ..ADDRESS 1. |a2112 N. Smallwood Street > ..ADDRESS 2. |a2112 Orleans St. #45 > ......... > I have to substitute only that line that starts with ".ADDRESS 1. |a" > > Thanks. > > > > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > **** DISCLAIMER **** "This e-mail and any attachment thereto may contain information which is confidential and/or protected by intellectual property rights and are intended for the sole use of the recipient(s) named above. Any use of the information contained herein (including, but not limited to, total or partial reproduction, communication or distribution in any form) by other persons than the designated recipient(s) is prohibited. If you have received this e-mail in error, please notify the sender either by telephone or by e-mail and delete the material from any computer". Thank you for your cooperation. For further information about Proximus mobile phone services please see our website at http://www.proximus.be or refer to any Proximus agent. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]