RE: how to manipulate word using perl

[email protected] ("Rajnikant")
Newsgroups perl.beginners
Message-ID <[email protected]>
Try this:
 perl -pli -e 's/.txt/=/' input_file 

Search for 'How to replace some string in file' topic in same mailing list
for more info.

~~~~~~~~~~~~~~~~~~~~
Thanks and Best regards,
~ Rajnikant
Software Engg.
Persistent Sys. Ltd.
Ph. +91 98222 04088

-----Original Message-----
From: Gowri Chandra Sekhar Barla, TLS, Chennai [mailto:[email protected]] 
Sent: Tuesday, June 10, 2008 11:15 AM
To: [email protected]
Subject: how to manipulate word using perl


Hi all

I facing a problem to substitute extensions of file with " = "


For example:

In a file I have names of some files

a.txt
b.txt
c.txt

I want them to 

a=
b=
c=

Thanks and regards
Sekhar

DISCLAIMER:
----------------------------------------------------------------------------
-------------------------------------------

The contents of this e-mail and any attachment(s) are confidential and
intended for the named recipient(s) only.
It shall not attach any liability on the originator or HCL or its
affiliates. Any views or opinions presented in this email are solely those
of the author and may not necessarily reflect the opinions of HCL or its
affiliates.
Any form of reproduction, dissemination, copying, disclosure, modification,
distribution and / or publication of this message without the prior written
consent of the author of this e-mail is strictly prohibited. If you have
received this email in error please delete it and notify the sender
immediately. Before opening any mail and attachments please check them for
viruses and defect.

----------------------------------------------------------------------------
-------------------------------------------

--
To unsubscribe, e-mail: [email protected] For additional
commands, e-mail: [email protected] http://learn.perl.org/



DISCLAIMER
==========
This e-mail may contain privileged and confidential information which is the property of Persistent Systems Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Ltd. does not accept any liability for virus infected mails.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.