You are not saving the changes to the file...

Try something like this

open NOTE, "c:\\data.txt" or die "Can't open data.txt: $!";
open OUT, ">c:\\out.txt" or die "Can't create out.txt: $!";

while (<NOTE>) {
        s/;/\n/g;
        print OUT;
}

close NOTE;
close OUT;

-----Original Message-----
From: Veeraraju_Mareddi [mailto:[EMAIL PROTECTED]]
Sent: 07 September 2001 10:36
To: '[EMAIL PROTECTED]'
Cc: '[EMAIL PROTECTED]'
Subject: Regex s///


Dear All

I have a large data file which has ; as delimiter and i want this to be
replaced newline character ,but unfortunately my script is not working


my code is given below
####################################################
open(NOTE ,">>c:\\data.txt");  #data file
while (<NOTE>)
{
s/;/"\n"/;
}

close(NOTE);
#######################################################

It doesn't report any error task is not being performed

Please help me.

Thanks and Reagrds
Raju



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


--------------------------Confidentiality--------------------------.
This E-mail is confidential.  It should not be read, copied, disclosed or
used by any person other than the intended recipient.  Unauthorised use,
disclosure or copying by whatever medium is strictly prohibited and may be
unlawful.  If you have received this E-mail in error please contact the
sender immediately and delete the E-mail from your system.



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to