------_=_NextPart_001_01C88762.E30EBEE7
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Hi
=20
I am unable to modify the input file ,
=20
If I am redirecting output to with different file name it working fine
=20
=20
In want to replace name in a file
=20
Script: problem
=20
print " Enter the file Name \n";
$filename =3D <STDIN>;
open(INPUT,"<$filename");
open(OUTPUT,">filename");
while(<INPUT>)
{
if($_ =3D~ s/FRCC/FRE/)
{
print OUTPUT "$_";
}
else
{
print OUTPUT "$_";
=20
}
=20
Script: No problem script working fine
=20
print " Enter the file Name \n";
$filename =3D <STDIN>;
open(INPUT,"<$filename");
open(OUTPUT,">new1=2Ec");
while(<INPUT>)
{
if($_ =3D~ s/FRCC/FRE/)
{
print OUTPUT "$_";
}
else
{
print OUTPUT "$_";
=20
}
=20
=20
Please help me
=20
=20
Thanks and regards
Chandu
=20
DISCLAIMER:
---------------------------------------------------------------------------=
--------------------------------------------
The contents of this e-mail and any attachment(s) are confidential and=
intended for the named recipient(s) only=2E
It shall not attach any liability on the originator or HCL or its=
affiliates=2E Any views or opinions presented in=20
this email are solely those of the author and may not necessarily reflect=
the opinions of HCL or its affiliates=2E
Any form of reproduction, dissemination, copying, disclosure,
modification,=
distribution and / or publication of=20
this message without the prior written consent of the author of this
e-mail=
is strictly prohibited=2E If you have
received this email in error please delete it and notify the sender=
immediately=2E Before opening any mail and=20
attachments please check them for viruses and defect=2E
---------------------------------------------------------------------------=
--------------------------------------------
------_=_NextPart_001_01C88762.E30EBEE7--


|