This worked. This is perfect solution. Thanks very much. Regards Jay
-----Original Message----- From: Connie Chan [mailto:[EMAIL PROTECTED]] Sent: Friday, July 26, 2002 4:53 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: search and replace in a file > [...] > > $file = $ARGV[0]; > open (INPUT, "$file"); > open (OUTPUT, ">$file.out"); > $replacestr=/class/mtm/php; > $replacewith=CLASS_PHP; Try this : while (<INPUT>) { s/\b$replacestr\b/$replacewith/g ; print OUTPUT $_ } close (OUTPUT); close (INPUT); Rgds, Connie
**************************Disclaimer************************************ Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. ***************************************************************************
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]