Hi experts,
I have a set of xml files in folder which has the below field.
<mm:sessionID>157.235.206.12900397BE4:A</mm:sessionID>,
I need to update this field regularly with new session id, which I have it from a login file.
Can anyone tell me how to add a new value in <mm:sessionID> field in xml files
under the folder("/usr/home/automation/Sanity/xml/) using perl script?
Here is what I have
opendir(DIR, "/usr/home/automation/Sanity/xml/");
my @ssl = grep /\.xml$/, readdir(DIR); close(DIR);
foreach $ssl (@ssl) {
open(SSL, "$ssl");
my @in = <SSL>;
close(SSL);
foreach (@in) {
s/sessionID/$SID/;
}
}
Thanks
varma