Example, ask yourself, is an Interface information always in a block that has a form that always starts with the /^Interface\s(\w+)$/ ? If so, then read in the file, pushing each (chomped) line into an array. When you get to the next Interface block, process the array you have built up in a function (to make the code look cleaner). In this function you can iterate over each element of the array looking for the data you want to extract (vrid, state, etc) and print it out (or pass that info on to another function that does the printing).
This way you keep your code looking clean and polished, thus easier for you and others to read and understand. It will also be easier for you to debug. You can then easily figure out why your code mixes up the interfaces and the addresses.
-imran
In reply to Re: Trying to use Spreadsheet::WriteExcel. What could be the problem?
by CountOrlok
in thread Trying to use Spreadsheet::WriteExcel. What could be the problem?
by sunny
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |