Good one liner ....I appreciate it .. Arjun
-----Original Message----- From: Ramprasad A Padmanabhan [mailto:[EMAIL PROTECTED] Sent: Monday, October 11, 2004 4:41 PM To: Urs Wagner Cc: perl beginners Subject: Re: Line replace On Mon, 2004-10-11 at 16:23, Urs Wagner wrote: > Hello > > I should comment out lines in a text file. I have a lot of troubles to > realize this. > > The lines > Alpha(a, b, c) > should be changed to > # Alpha(a, b, c) > perl -pli.BAK -e 's/(?=.*Alpha\(a, b ,c\))/#/' FILENAME HTH Ram -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response> Confidentiality Notice The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>