Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^2: Search and replace in portion of xml file

by sandy1028 (Sexton)
on Jun 02, 2009 at 09:27 UTC ( [id://767519] : note . print w/replies, xml ) Need Help??


in reply to Re: Search and replace in portion of xml file
in thread Search and replace in portion of xml file

Thanks for all the replies. I am trying to replace the text ctrl+O which is ^O in the file.
open FH,'a.txt'; @data=<FH>; foreach $dat (@data){ $dat =~ s/\^O/ /g; }
I am trying to replace the control characters with a space but no luck. Please can you suggest me how to proceed

Replies are listed 'Best First'.
Re^3: Search and replace in portion of xml file
by Jenda (Abbot) on Jun 02, 2009 at 10:58 UTC

    Perl doesn't understand what do you mean by that \^O. Try \x0F instead.

    Jenda
    Enoch was right!
    Enjoy the last years of Rome.