in reply to Edit values in XML and Save?
I know it avoids all the fun and overhead of a *real* XML parser, but isn't that part of the point of making XML human-readable - for quick Perl-hack purposes? <g> Thanks mirod...<g>use File::Slurp; my $s = read_file("test.xml"); $s =~ s/(<number>)(\d+)(</number>)/$1.($2 + 10).$3/eg; write_file("test.xml",$s);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Edit values in XML and Save?
by Cody Pendant (Prior) on Mar 06, 2003 at 00:27 UTC |