G
guilhy.nogueira
Hello!
I'm new to Perl programming, and i want a wildcard to change the
following line:
<owner name="Hopugop"/>
to
<owner name=""/>
in many differents files.
i have a script here:
----------------------
for $file (glob "../data/houses/*")
{
next unless $file =~ /\.xml$/;
open(FILE, $file);
@content = <FILE>;
$_ = "@content";
close(FILE);
s/<owner name="Hopugop"\/>/<owner name=""\/>/;
open(FILE, ">$file");
print FILE;
close(FILE);
}
----------------------
But, with this script, i can only change "Hopugop" to "", not like
another names...
if you could help me... =D
PS.: This is an Open Tibia Server (OTServer) script... If you have
another ones... please send it to me.
I'm new to Perl programming, and i want a wildcard to change the
following line:
<owner name="Hopugop"/>
to
<owner name=""/>
in many differents files.
i have a script here:
----------------------
for $file (glob "../data/houses/*")
{
next unless $file =~ /\.xml$/;
open(FILE, $file);
@content = <FILE>;
$_ = "@content";
close(FILE);
s/<owner name="Hopugop"\/>/<owner name=""\/>/;
open(FILE, ">$file");
print FILE;
close(FILE);
}
----------------------
But, with this script, i can only change "Hopugop" to "", not like
another names...
if you could help me... =D
PS.: This is an Open Tibia Server (OTServer) script... If you have
another ones... please send it to me.