P is for Practical | |
PerlMonks |
Re: How do I use a template, csv file and script to generate multiple switch configurationsby hdb (Monsignor) |
on Apr 15, 2013 at 19:52 UTC ( [id://1028759]=note: print w/replies, xml ) | Need Help?? |
At a glance, it looks like you need to replace < with < and > with > to make it work. Ie.
Some comments: The line $ofile_name = $name . ".txt"; uses a variable $name which is not defined. Should this be $hostname probably? In your file with the CSV variables change the first line to # ip,hostname,location and add a line to filter out comment lines starting with # like this:
I have not run the code as the template file is not present, so there might be glitches in my code.
In Section
Seekers of Perl Wisdom
|
|