in reply to Re: no output
in thread no output

First thanks for the quick responses; I have a csv file with hosts in on column and their IP address in the second. CSV format:

FTC-R17N6340-C04-1;10.1.70.1 FTC-R17N6340-C04-2,10.1.70.2 FTC-R17N6340-C04-3,10.1.70.3
My XML template has two instances of hostname that need to be replaced with the first collumn and one instance of ILO being replaced by the IP address. XML:
<host> <host>hostname</host> <name>hostname</name> <description/> <proxy/> <status>0</status> <ipmi_authtype>-1</ipmi_authtype> <ipmi_privilege>2</ipmi_privilege> <ipmi_username/> <ipmi_password/> <tls_connect>1</tls_connect> <tls_accept>1</tls_accept> <tls_issuer/> <tls_subject/> <tls_psk_identity/> <tls_psk/> <templates/> <groups> <group> <name>C7000 Chassis</name> </group> </groups> <interfaces> <interface> <default>1</default> <type>1</type> <useip>1</useip> <ip>ILO</ip> <dns/> <port>10050</port>
After the text is replaced I want the template with the new host information appended to the XML file but leaving the template intact ready for the second line.

Replies are listed 'Best First'.
Re^3: no output
by GrandFather (Saint) on Apr 07, 2016 at 01:22 UTC

    So you are using a template file to render an output file. Use HTML::Template. Despite the name it's a general purpose templating system that does well and consistently what you are trying to do.

    Premature optimization is the root of all job security